-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathSubscribableEvent.fs
43 lines (37 loc) · 1.48 KB
/
SubscribableEvent.fs
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
// ts2fable 0.0.0
module rec SubscribableEvent
open System
open Fable.Core
open Fable.Core.JS
type [<AllowNullLiteral>] IExports =
/// SubscribableEvent.ts
///
/// Copyright (c) Microsoft Corporation. All rights reserved.
/// Licensed under the MIT license.
///
/// A simple strongly-typed pub/sub/fire eventing system.
abstract SubscriptionToken: SubscriptionTokenStatic
abstract SubscribableEvent: SubscribableEventStatic
/// SubscribableEvent.ts
///
/// Copyright (c) Microsoft Corporation. All rights reserved.
/// Licensed under the MIT license.
///
/// A simple strongly-typed pub/sub/fire eventing system.
type [<AllowNullLiteral>] SubscriptionToken =
abstract unsubscribe: unit -> unit
/// SubscribableEvent.ts
///
/// Copyright (c) Microsoft Corporation. All rights reserved.
/// Licensed under the MIT license.
///
/// A simple strongly-typed pub/sub/fire eventing system.
type [<AllowNullLiteral>] SubscriptionTokenStatic =
[<EmitConstructor>] abstract Create: _event: SubscribableEvent<obj option> * _callback: (ResizeArray<obj option> -> U2<bool, unit>) -> SubscriptionToken
type [<AllowNullLiteral>] SubscribableEvent<'F> =
abstract dispose: unit -> unit
abstract subscribe: callback: 'F -> SubscriptionToken
abstract unsubscribe: callback: 'F -> unit
abstract fire: 'F with get, set
type [<AllowNullLiteral>] SubscribableEventStatic =
[<EmitConstructor>] abstract Create: ?_allowStopPropagation: bool -> SubscribableEvent<'F>