@expressive/mvc 1.0.0-beta.23 → 1.0.0-beta.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.esm.js +1235 -0
- package/lib/index.esm.js.map +1 -0
- package/lib/index.js +218 -177
- package/lib/index.js.map +1 -0
- package/package.json +9 -15
- package/types/instructions.d.ts +61 -36
- package/types/model.d.ts +52 -21
- package/types/types.d.ts +3 -3
package/types/types.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export type Key = string | symbol | number;
|
|
2
|
-
export type Async = (...args: any[]) => Promise<any>;
|
|
2
|
+
export type Async<T = any> = (this: T, ...args: any[]) => Promise<any>;
|
|
3
3
|
export type BunchOf<T> = { [key: string]: T };
|
|
4
4
|
|
|
5
5
|
export type Class = new (...args: any[]) => any;
|
|
@@ -7,10 +7,10 @@ export type InstanceOf<T> = T extends { prototype: infer U } ? U : never;
|
|
|
7
7
|
export type IfApplicable<T extends {}, K> = K extends keyof T ? T[K] : undefined;
|
|
8
8
|
|
|
9
9
|
export type Callback = () => void;
|
|
10
|
-
export type RequestCallback = (keys
|
|
10
|
+
export type RequestCallback = (keys: readonly string[]) => void;
|
|
11
11
|
export type EffectCallback<T, A = T> = (this: T, argument: A) => Callback | Promise<any> | void;
|
|
12
12
|
export type UpdateCallback<T, P> = (this: T, value: IfApplicable<T, P>, changed: P) => void;
|
|
13
|
-
export type InterceptCallback<T> = (argument: T) => ((next: T) => void) | Promise<any> | void | boolean;
|
|
13
|
+
export type InterceptCallback<T, S = any> = (this: S, argument: T) => ((next: T) => void) | Promise<any> | void | boolean;
|
|
14
14
|
|
|
15
15
|
export type RefFunction = (e: HTMLElement | null) => void;
|
|
16
16
|
|