forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
elm.d.ts
28 lines (22 loc) · 731 Bytes
/
elm.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
// Type definitions for Elm 0.12
// Project: http://elm-lang.org
// Definitions by: Dénes Harmath <https://github.com/thSoft>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
declare var Elm: Elm;
interface Elm {
embed<P>(elmModule: ElmModule<P>, element: Node, initialValues?: Object): ElmComponent<P>;
fullscreen<P>(elmModule: ElmModule<P>, initialValues?: Object): ElmComponent<P>;
worker<P>(elmModule: ElmModule<P>, initialValues?: Object): ElmComponent<P>;
}
interface ElmModule<P> {
}
interface ElmComponent<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;
}