@expressive/mvc 0.51.1 → 0.51.2
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/dist/index.d.ts +1 -3
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -68,7 +68,6 @@ declare namespace Model {
|
|
|
68
68
|
* Optional returned callback will run when once upon first access.
|
|
69
69
|
*/
|
|
70
70
|
type Instruction<T = any, M extends Model = any> = (this: M, key: Extract<Field<M>, string>, thisArg: M, state: State<M>) => Descriptor<T> | ((source: M) => T) | void;
|
|
71
|
-
type VoidInstruction<M extends Model = any> = (this: M, key: Extract<Field<M>, string>, thisArg: M, state: State<M>) => ((source: Model) => void) | void;
|
|
72
71
|
type Getter<T> = (source: Model) => T;
|
|
73
72
|
type Setter<T> = (value: T, previous: T) => boolean | void | (() => T);
|
|
74
73
|
type Descriptor<T = any> = {
|
|
@@ -347,8 +346,7 @@ declare function set<T>(factory: set.Factory<T> | Promise<T>, required?: boolean
|
|
|
347
346
|
*/
|
|
348
347
|
declare function set<T>(value: T | undefined, onUpdate: set.Callback<T>): T;
|
|
349
348
|
|
|
350
|
-
declare function use(instruction: Model.
|
|
351
|
-
declare function use<T>(instruction: Model.Instruction<T>): T;
|
|
349
|
+
declare function use<T>(instruction: Model.Instruction<T>): T extends void ? unknown : T;
|
|
352
350
|
declare function use<T extends Model>(Type: Model.Init<T>, required: false): T | undefined;
|
|
353
351
|
declare function use<T extends Model>(Type: Model.Init<T>, ready?: (i: T) => void): T;
|
|
354
352
|
|
package/package.json
CHANGED