@lincode/events 1.0.26 → 1.0.27

Sign up to get free protection for your applications and to get access to all the features.
package/lib/event.d.ts CHANGED
@@ -1,6 +1,12 @@
1
1
  import { Cancellable } from "@lincode/promiselikes";
2
- export declare type Emit<T> = (val: T, isState?: boolean) => void;
3
- export declare type On<T> = (cb: (val: T) => void, once?: boolean) => Cancellable;
4
- export declare type GetState<T> = () => T | undefined;
2
+ declare type Emit<T> = (val: T, isState?: boolean) => void;
3
+ declare type On<T> = (cb: (val: T) => void, once?: boolean) => Cancellable;
4
+ declare type GetState<T> = () => T | undefined;
5
+ export declare type EventFunctions = readonly [
6
+ Emit<void>,
7
+ On<void>,
8
+ Emit<void>,
9
+ GetState<void>
10
+ ];
5
11
  declare const _default: <T = void>() => readonly [Emit<T>, On<T>, Emit<T>, GetState<T>];
6
12
  export default _default;
package/lib/index.d.ts CHANGED
@@ -1,2 +1,2 @@
1
1
  export { default, default as Events } from "./Events";
2
- export { default as event, Emit, On, GetState } from "./event";
2
+ export { default as event, EventFunctions } from "./event";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lincode/events",
3
- "version": "1.0.26",
3
+ "version": "1.0.27",
4
4
  "description": "Generated by ambients-cli",
5
5
  "author": "Lai Schwe",
6
6
  "license": "MIT",
package/src/event.ts CHANGED
@@ -37,9 +37,16 @@ class Event<Payload = void> {
37
37
  }
38
38
  }
39
39
 
40
- export type Emit<T> = (val: T, isState?: boolean) => void
41
- export type On<T> = (cb: (val: T) => void, once?: boolean) => Cancellable
42
- export type GetState<T> = () => T | undefined
40
+ type Emit<T> = (val: T, isState?: boolean) => void
41
+ type On<T> = (cb: (val: T) => void, once?: boolean) => Cancellable
42
+ type GetState<T> = () => T | undefined
43
+
44
+ export type EventFunctions = readonly [
45
+ Emit<void>,
46
+ On<void>,
47
+ Emit<void>,
48
+ GetState<void>
49
+ ]
43
50
 
44
51
  export default <T = void>() => {
45
52
  const event = new Event<T>()
package/src/index.ts CHANGED
@@ -1,2 +1,2 @@
1
1
  export { default, default as Events } from "./Events"
2
- export { default as event, Emit, On, GetState } from "./event"
2
+ export { default as event, EventFunctions } from "./event"