as-model 0.1.5 → 0.1.6
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/index.d.ts +25 -22
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -107,25 +107,12 @@ export declare interface ModelKey<
|
|
|
107
107
|
createStore: <D extends S>(state?: D) => Store<S, T, R>;
|
|
108
108
|
}
|
|
109
109
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
R extends (instance: () => T) => any = (instance: () => T) => T
|
|
117
|
-
>(
|
|
118
|
-
model: Model<S, T> | ModelUsage<S, T, R>,
|
|
119
|
-
state?: D
|
|
120
|
-
): ModelKey<S, T, R>;
|
|
121
|
-
isModelKey: <
|
|
122
|
-
ST,
|
|
123
|
-
INS extends ModelInstance,
|
|
124
|
-
SE extends (instance: () => INS) => any = (instance: () => INS) => INS
|
|
125
|
-
>(
|
|
126
|
-
data: unknown
|
|
127
|
-
) => data is ModelKey<ST, INS, SE>;
|
|
128
|
-
}
|
|
110
|
+
export declare function createKey<
|
|
111
|
+
S,
|
|
112
|
+
T extends ModelInstance,
|
|
113
|
+
D extends S,
|
|
114
|
+
R extends (instance: () => T) => any = (instance: () => T) => T
|
|
115
|
+
>(model: Model<S, T> | ModelUsage<S, T, R>, state?: D): ModelKey<S, T, R>;
|
|
129
116
|
|
|
130
117
|
/** createStores * */
|
|
131
118
|
|
|
@@ -256,9 +243,25 @@ export declare function createSelector<
|
|
|
256
243
|
|
|
257
244
|
/** config * */
|
|
258
245
|
export declare function config(configuration: Config): {
|
|
259
|
-
createStore:
|
|
260
|
-
|
|
261
|
-
|
|
246
|
+
createStore: <
|
|
247
|
+
S,
|
|
248
|
+
T extends ModelInstance,
|
|
249
|
+
D extends S,
|
|
250
|
+
R extends (instance: () => T) => any = (instance: () => T) => T
|
|
251
|
+
>(
|
|
252
|
+
model: Model<S, T> | Key<S, T, R> | ModelUsage<S, T, R>,
|
|
253
|
+
state?: D
|
|
254
|
+
) => Store<S, T, R>;
|
|
255
|
+
createKey: <
|
|
256
|
+
S,
|
|
257
|
+
T extends ModelInstance,
|
|
258
|
+
D extends S,
|
|
259
|
+
R extends (instance: () => T) => any = (instance: () => T) => T
|
|
260
|
+
>(
|
|
261
|
+
model: Model<S, T> | ModelUsage<S, T, R>,
|
|
262
|
+
state?: D
|
|
263
|
+
) => ModelKey<S, T, R>;
|
|
264
|
+
createStores: (...modelKeys: (ModelKey | StoreIndex)[]) => StoreCollection;
|
|
262
265
|
model: model;
|
|
263
266
|
};
|
|
264
267
|
|