@expressive/react 0.43.3 → 0.45.0
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 +4 -4
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -41,7 +41,7 @@ declare namespace Provider {
|
|
|
41
41
|
value: Context;
|
|
42
42
|
children?: ReactNode;
|
|
43
43
|
}>;
|
|
44
|
-
type Item = Model | Model.
|
|
44
|
+
type Item = Model | Model.Type;
|
|
45
45
|
type Multiple<T extends Item = Item> = {
|
|
46
46
|
[key: string | number]: T;
|
|
47
47
|
};
|
|
@@ -98,15 +98,15 @@ declare module '@expressive/mvc' {
|
|
|
98
98
|
*
|
|
99
99
|
* @param render Function which renders component. This function receives all Model state merged with props. Normal subscription behavior still applies.
|
|
100
100
|
*/
|
|
101
|
-
function as<T extends Model, P = {}>(this: Model.
|
|
101
|
+
function as<T extends Model, P = {}>(this: Model.Type<T>, render: (using: T & P) => React.ReactNode): Component<T, P & Model.Assign<T>>;
|
|
102
102
|
/** Fetch instance of this class from context. */
|
|
103
103
|
function get<T extends Model>(this: Model.Type<T>, passive?: true): T;
|
|
104
104
|
/** Fetch instance of this class optionally. May be undefined, but will never subscribe. */
|
|
105
105
|
function get<T extends Model>(this: Model.Type<T>, required: boolean): T | undefined;
|
|
106
106
|
function get<T extends Model, R>(this: Model.Type<T>, factory: get.Factory<T, Promise<R> | R>): NoVoid<R>;
|
|
107
107
|
function get<T extends Model, R>(this: Model.Type<T>, factory: get.Factory<T, null>): NoVoid<R> | null;
|
|
108
|
-
function use<T extends Model>(this: Model.
|
|
109
|
-
function use<T extends Model>(this: Model.
|
|
108
|
+
function use<T extends Model>(this: Model.Type<T>, apply?: Model.Assign<T>, repeat?: boolean): T;
|
|
109
|
+
function use<T extends Model>(this: Model.Type<T>, callback?: Model.Callback<T>, repeat?: boolean): T;
|
|
110
110
|
}
|
|
111
111
|
}
|
|
112
112
|
|
package/package.json
CHANGED
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"preversion": "npm run test && npm run build"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@expressive/mvc": "^0.
|
|
34
|
+
"@expressive/mvc": "^0.45.0"
|
|
35
35
|
},
|
|
36
36
|
"peerDependencies": {
|
|
37
37
|
"react": ">=16.8.0 <19.0.0"
|
|
@@ -42,6 +42,6 @@
|
|
|
42
42
|
"react": "^18.2.0",
|
|
43
43
|
"react-test-renderer": "^18.2.0"
|
|
44
44
|
},
|
|
45
|
-
"version": "0.
|
|
46
|
-
"gitHead": "
|
|
45
|
+
"version": "0.45.0",
|
|
46
|
+
"gitHead": "011596452831f785cc685c9124adff02176b489f"
|
|
47
47
|
}
|