|
1 | 1 | type t |
2 | 2 | |
3 | | -type subscription |
4 | | - |
5 | 3 | @new @module("react-native") |
6 | 4 | external make: 'nativeModule => t = "NativeEventEmitter" |
7 | 5 | |
8 | 6 | @send |
9 | | -external addListener: (t, string, 'a => unit) => subscription = "addListener" |
| 7 | +external addListener: (t, string, 'a => unit) => EventSubscription.t = "addListener" |
10 | 8 | |
11 | 9 | @send |
12 | 10 | external removeAllListeners: (t, string) => unit = "removeAllListeners" |
13 | 11 | |
14 | 12 | @send external listenerCount: (t, string) => unit = "listenerCount" |
15 | | - |
16 | | -module Subscription = { |
17 | | - @send external remove: (subscription, unit) => unit = "remove" |
18 | | -} |