@types/elm
TypeScript icon, indicating that this package has built-in type declarations

0.19.3 • Public • Published

Installation

npm install --save @types/elm

Summary

This package contains type definitions for elm (http://elm-lang.org).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/elm.

index.d.ts

interface ElmInstance<P = {}> {
    Main: ElmMain<P>;
}

interface ElmMain<P> {
    init(options: { node?: Node | undefined; flags?: any }): ElmApp<P>;
}

interface ElmApp<P> {
    ports: P;
}

interface PortToElm<V> {
    send(value: V): void;
}

interface PortFromElm<V> {
    subscribe(handler: (value: V) => void): void;
    unsubscribe(handler: (value: V) => void): void;
}

Additional Details

  • Last updated: Mon, 06 Nov 2023 22:41:05 GMT
  • Dependencies: none

Credits

These definitions were written by Dénes Harmath, and Renan Vaz .

Readme

Keywords

none

Package Sidebar

Install

npm i @types/elm

Weekly Downloads

922

Version

0.19.3

License

MIT

Unpacked Size

3.42 kB

Total Files

5

Last publish

Collaborators

  • types