@expressive/mvc 1.0.0-beta.41 → 1.0.0-beta.44
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.d.ts +21 -4
- package/lib/index.esm.js +359 -339
- package/lib/index.esm.js.map +1 -1
- package/lib/index.js +359 -339
- package/lib/index.js.map +1 -1
- package/package.json +2 -2
package/lib/index.d.ts
CHANGED
|
@@ -220,7 +220,8 @@ declare namespace Instruction {
|
|
|
220
220
|
value?: T;
|
|
221
221
|
writable?: boolean;
|
|
222
222
|
get?: Getter<T>;
|
|
223
|
-
set?: Setter<T> | false
|
|
223
|
+
set?: Setter<T> | false;
|
|
224
|
+
suspense?: boolean;
|
|
224
225
|
}
|
|
225
226
|
|
|
226
227
|
interface ExplicitDescriptor extends PropertyDescriptor {
|
|
@@ -231,7 +232,8 @@ declare namespace Instruction {
|
|
|
231
232
|
recursive: true;
|
|
232
233
|
enumerable?: boolean;
|
|
233
234
|
value?: T;
|
|
234
|
-
set?: Setter<T> | false
|
|
235
|
+
set?: Setter<T> | false;
|
|
236
|
+
suspense?: boolean;
|
|
235
237
|
}
|
|
236
238
|
}
|
|
237
239
|
|
|
@@ -533,8 +535,23 @@ declare class Global extends MVC {
|
|
|
533
535
|
* Returns a thenable; resolves after successful update.
|
|
534
536
|
* If instance does not already exist, one will be created.
|
|
535
537
|
*/
|
|
536
|
-
static set<T extends typeof Global>(this: T, updates: Partial<InstanceOf<T>>):
|
|
537
|
-
|
|
538
|
+
static set<T extends typeof Global>(this: T, updates: Partial<InstanceOf<T>>): Promise<false>;
|
|
539
|
+
/**
|
|
540
|
+
* **React Hook** - Fetch most instance of this controller from context, if it exists.
|
|
541
|
+
*
|
|
542
|
+
* @param required - If false, may return undefined.
|
|
543
|
+
*/
|
|
544
|
+
static get<T extends Class>(this: T, required?: true): InstanceOf<T>;
|
|
545
|
+
/**
|
|
546
|
+
* **React Hook** - Fetch most instance of this controller from context.
|
|
547
|
+
*
|
|
548
|
+
* @param required - Unless false, will throw where instance cannot be found.
|
|
549
|
+
*/
|
|
550
|
+
static get<T extends Class>(this: T, required: boolean): InstanceOf<T> | undefined;
|
|
551
|
+
/**
|
|
552
|
+
* **React Hook** - Fetch specific value from instance of this controller in context.
|
|
553
|
+
*/
|
|
554
|
+
static get<T extends Class, K extends Model.Field<InstanceOf<T>>>(this: T, key: K): InstanceOf<T>[K];
|
|
538
555
|
/** Destroy current instance of Global, if it exists. */
|
|
539
556
|
static reset(): void;
|
|
540
557
|
destroy(): void;
|