@akanjs/store 0.9.48 → 0.9.50
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/cjs/src/baseSt.js +7 -18
- package/cjs/src/index.js +1 -0
- package/cjs/src/storeDecorators.js +180 -192
- package/cjs/src/storeInfo.js +65 -0
- package/esm/src/baseSt.js +8 -21
- package/esm/src/index.js +1 -0
- package/esm/src/storeDecorators.js +182 -196
- package/esm/src/storeInfo.js +46 -0
- package/package.json +1 -1
- package/src/baseSt.d.ts +5 -77
- package/src/index.d.ts +1 -0
- package/src/storeDecorators.d.ts +36 -26
- package/src/storeInfo.d.ts +20 -0
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { baseSt, makeStore } from "./storeDecorators";
|
|
2
|
+
const storeInfo = {
|
|
3
|
+
store: /* @__PURE__ */ new Map(),
|
|
4
|
+
storeRefNameMap: /* @__PURE__ */ new Map(),
|
|
5
|
+
setRefNameTemp(refName, store) {
|
|
6
|
+
Reflect.defineMetadata("akan:storeRefName", refName, store.prototype);
|
|
7
|
+
},
|
|
8
|
+
getRefNameTemp(store) {
|
|
9
|
+
const refName = Reflect.getMetadata("akan:storeRefName", store.prototype);
|
|
10
|
+
if (!refName)
|
|
11
|
+
throw new Error(`No ref name for store: ${store}`);
|
|
12
|
+
return refName;
|
|
13
|
+
},
|
|
14
|
+
setState(storeRef, applyState) {
|
|
15
|
+
const state = storeInfo.getState(storeRef);
|
|
16
|
+
Object.assign(state, applyState);
|
|
17
|
+
Reflect.defineMetadata("akan:store:state", state, storeRef.prototype);
|
|
18
|
+
},
|
|
19
|
+
getState(storeRef) {
|
|
20
|
+
const state = Reflect.getMetadata("akan:store:state", storeRef.prototype);
|
|
21
|
+
return state ?? {};
|
|
22
|
+
},
|
|
23
|
+
applyAction(storeRef) {
|
|
24
|
+
const actionKeys = Object.getOwnPropertyNames(storeRef.prototype).filter((key) => key !== "constructor");
|
|
25
|
+
const action = storeInfo.getAction(storeRef);
|
|
26
|
+
const applyAction = Object.fromEntries(actionKeys.map((key) => [key, storeRef.prototype[key]]));
|
|
27
|
+
Object.assign(action, applyAction);
|
|
28
|
+
Reflect.defineMetadata("akan:store:action", action, storeRef.prototype);
|
|
29
|
+
},
|
|
30
|
+
getAction(storeRef) {
|
|
31
|
+
const action = Reflect.getMetadata("akan:store:action", storeRef.prototype);
|
|
32
|
+
return action ?? {};
|
|
33
|
+
},
|
|
34
|
+
register(refName, storeRef) {
|
|
35
|
+
storeInfo.setRefNameTemp(refName, storeRef);
|
|
36
|
+
storeInfo.applyAction(storeRef);
|
|
37
|
+
storeInfo.store.set(refName, storeRef);
|
|
38
|
+
return storeRef;
|
|
39
|
+
},
|
|
40
|
+
buildStore(signals) {
|
|
41
|
+
makeStore(baseSt, signals);
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
export {
|
|
45
|
+
storeInfo
|
|
46
|
+
};
|
package/package.json
CHANGED
package/src/baseSt.d.ts
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { Responsive } from "@akanjs/constant";
|
|
2
2
|
import { RoleType, SignalType } from "@akanjs/signal";
|
|
3
|
+
import { StoreOf } from "./storeDecorators";
|
|
3
4
|
declare const defaultMessage: {
|
|
4
5
|
type: "info" | "success" | "error" | "warning" | "loading";
|
|
5
6
|
content: string;
|
|
6
7
|
duration: number;
|
|
7
8
|
key: string;
|
|
8
9
|
};
|
|
9
|
-
declare const RootStore_base: import("@akanjs/base").Type<import("./storeDecorators").
|
|
10
|
+
declare const RootStore_base: import("@akanjs/base").Type<import("./storeDecorators").StoreInstance<{
|
|
10
11
|
csrLoaded: boolean;
|
|
11
12
|
path: string;
|
|
12
13
|
pathname: string;
|
|
@@ -41,45 +42,7 @@ declare const RootStore_base: import("@akanjs/base").Type<import("./storeDecorat
|
|
|
41
42
|
}) => Promise<void>;
|
|
42
43
|
deviceToken: string;
|
|
43
44
|
currentPath: string;
|
|
44
|
-
}
|
|
45
|
-
__STATE_INFO__: {
|
|
46
|
-
csrLoaded: boolean;
|
|
47
|
-
path: string;
|
|
48
|
-
pathname: string;
|
|
49
|
-
params: {
|
|
50
|
-
[key: string]: string;
|
|
51
|
-
};
|
|
52
|
-
searchParams: {
|
|
53
|
-
[key: string]: string;
|
|
54
|
-
};
|
|
55
|
-
theme: string;
|
|
56
|
-
prefix: string | undefined;
|
|
57
|
-
innerWidth: number;
|
|
58
|
-
innerHeight: number;
|
|
59
|
-
responsive: Responsive;
|
|
60
|
-
uiOperation: "sleep" | "loading" | "idle";
|
|
61
|
-
messages: (typeof defaultMessage)[];
|
|
62
|
-
tryJwt: string | null;
|
|
63
|
-
trySignalType: SignalType;
|
|
64
|
-
tryRoles: RoleType[];
|
|
65
|
-
tryAccount: {
|
|
66
|
-
__InternalArg__: "Account";
|
|
67
|
-
self?: import("@akanjs/signal").Self;
|
|
68
|
-
me?: import("@akanjs/signal").Me;
|
|
69
|
-
appName: string;
|
|
70
|
-
environment: import("@akanjs/base").Environment;
|
|
71
|
-
};
|
|
72
|
-
keyboardHeight: number;
|
|
73
|
-
pageState: import("@akanjs/client").PageState;
|
|
74
|
-
devMode: boolean;
|
|
75
|
-
getSelf: ({ reset }?: {
|
|
76
|
-
reset?: boolean;
|
|
77
|
-
}) => Promise<void>;
|
|
78
|
-
deviceToken: string;
|
|
79
|
-
currentPath: string;
|
|
80
|
-
};
|
|
81
|
-
__SLICE_INFO__: {};
|
|
82
|
-
}>;
|
|
45
|
+
}, {}, {}>>;
|
|
83
46
|
export declare class RootStore extends RootStore_base {
|
|
84
47
|
setDevMode(value: boolean): void;
|
|
85
48
|
setWindowSize(): void;
|
|
@@ -88,41 +51,6 @@ export declare class RootStore extends RootStore_base {
|
|
|
88
51
|
} & Partial<typeof defaultMessage>): void;
|
|
89
52
|
hideMessage(key: string): void;
|
|
90
53
|
}
|
|
91
|
-
export declare const
|
|
92
|
-
export declare const st:
|
|
93
|
-
csrLoaded: boolean;
|
|
94
|
-
path: string;
|
|
95
|
-
pathname: string;
|
|
96
|
-
params: {
|
|
97
|
-
[key: string]: string;
|
|
98
|
-
};
|
|
99
|
-
searchParams: {
|
|
100
|
-
[key: string]: string;
|
|
101
|
-
};
|
|
102
|
-
theme: string;
|
|
103
|
-
prefix: string | undefined;
|
|
104
|
-
innerWidth: number;
|
|
105
|
-
innerHeight: number;
|
|
106
|
-
responsive: Responsive;
|
|
107
|
-
uiOperation: "sleep" | "loading" | "idle";
|
|
108
|
-
messages: (typeof defaultMessage)[];
|
|
109
|
-
tryJwt: string | null;
|
|
110
|
-
trySignalType: SignalType;
|
|
111
|
-
tryRoles: RoleType[];
|
|
112
|
-
tryAccount: {
|
|
113
|
-
__InternalArg__: "Account";
|
|
114
|
-
self?: import("@akanjs/signal").Self;
|
|
115
|
-
me?: import("@akanjs/signal").Me;
|
|
116
|
-
appName: string;
|
|
117
|
-
environment: import("@akanjs/base").Environment;
|
|
118
|
-
};
|
|
119
|
-
keyboardHeight: number;
|
|
120
|
-
pageState: import("@akanjs/client").PageState;
|
|
121
|
-
devMode: boolean;
|
|
122
|
-
getSelf: ({ reset }?: {
|
|
123
|
-
reset?: boolean;
|
|
124
|
-
}) => Promise<void>;
|
|
125
|
-
deviceToken: string;
|
|
126
|
-
currentPath: string;
|
|
127
|
-
}, RootStore, {}>;
|
|
54
|
+
export declare const base: typeof RootStore;
|
|
55
|
+
export declare const st: StoreOf<RootStore>;
|
|
128
56
|
export {};
|
package/src/index.d.ts
CHANGED
package/src/storeDecorators.d.ts
CHANGED
|
@@ -1,11 +1,20 @@
|
|
|
1
1
|
import { DataList, type GetActionObject, type GetStateObject, type MergeAllKeyOfTypes, type MergeAllTypes, type MergedValues, type Prettify, Type } from "@akanjs/base";
|
|
2
2
|
import { type FetchPolicy } from "@akanjs/common";
|
|
3
|
-
import { DefaultOf, DocumentModel, FieldState,
|
|
4
|
-
import {
|
|
3
|
+
import { DefaultOf, DocumentModel, FieldState, ProtoFile, QueryOf } from "@akanjs/constant";
|
|
4
|
+
import type { FilterType, SortOf } from "@akanjs/document";
|
|
5
|
+
import { DbGraphQL, type DynamicSliceArgMap, FetchInitForm, SerializedSignal, SliceMeta } from "@akanjs/signal";
|
|
5
6
|
import { RefObject } from "react";
|
|
6
7
|
import { Mutate, StoreApi } from "zustand";
|
|
7
8
|
import type { Submit } from "./types";
|
|
8
9
|
export declare const baseSt: WithSelectors<unknown, unknown, {}>;
|
|
10
|
+
interface StoreMeta {
|
|
11
|
+
refName: string;
|
|
12
|
+
useKeys: string[];
|
|
13
|
+
doKeys: string[];
|
|
14
|
+
slices: SliceMeta[];
|
|
15
|
+
}
|
|
16
|
+
export declare const getStoreMeta: (storeName: string) => StoreMeta;
|
|
17
|
+
export declare const setStoreMeta: (storeName: string, storeMeta: StoreMeta) => void;
|
|
9
18
|
type BaseState<T extends string, Full, _Default = DefaultOf<Full>> = {
|
|
10
19
|
[K in T]: Full | null;
|
|
11
20
|
} & {
|
|
@@ -61,9 +70,6 @@ type DefaultState<T extends string, Input, Full, Light extends {
|
|
|
61
70
|
[K in keyof _DynamicSliceStateMap[Suffix] as K extends string ? Suffix extends string ? `${K}${Suffix}` : never : never]: _DynamicSliceStateMap[Suffix][K];
|
|
62
71
|
};
|
|
63
72
|
}>;
|
|
64
|
-
export declare const createState: <T extends string, Input, Full, Light extends {
|
|
65
|
-
id: string;
|
|
66
|
-
}, Insight, Filter extends FilterType, Fetch, Signal, _CapitalizedT extends string = Capitalize<T>, _Default = DefaultOf<Full>, _DefaultInput = DefaultOf<Input>, _DefaultState = GetStateObject<Full>, _DefaultStateInput = GetStateObject<Input>, _Doc = DocumentModel<Full>, _DocInput = DocumentModel<Input>, _QueryOfDoc = QueryOf<DocumentModel<Full>>, _Query = GetActionObject<Filter>, _Sort = SortOf<Filter>, _DynamicSliceArgMap = DynamicSliceArgMap<T, Input, Full, Filter, Signal, _CapitalizedT, _DefaultInput, _Sort>>(gql: DbGraphQL<T, Input, Full, Light, Insight, Filter, Fetch, Signal, _CapitalizedT, _Default, _DefaultInput, _DefaultState, _DefaultStateInput, _Doc, _DocInput, _QueryOfDoc, _Query, _Sort, _DynamicSliceArgMap>) => DefaultState<T, Input, Full, Light, Insight, Filter, Signal, _CapitalizedT, _Default, _DefaultInput, _Doc, _DocInput, _QueryOfDoc, _Query, _Sort, _DynamicSliceArgMap>;
|
|
67
73
|
type GetState<T, K> = K extends keyof T ? T[K] : never;
|
|
68
74
|
type PickState<G> = G extends () => infer S ? PickFunc<S, keyof S> : never;
|
|
69
75
|
type PickFunc<T, F extends keyof T = keyof T> = (...fields: F[]) => {
|
|
@@ -167,11 +173,6 @@ type DefaultActions<T extends string, Input, Full extends {
|
|
|
167
173
|
[K in keyof _DynamicSliceActionMap[Suffix] as K extends string ? Suffix extends string ? `${K}${Suffix}` : never : never]: _DynamicSliceActionMap[Suffix][K];
|
|
168
174
|
};
|
|
169
175
|
}>;
|
|
170
|
-
export declare const createActions: <T extends string, Input, Full extends {
|
|
171
|
-
id: string;
|
|
172
|
-
}, Light extends {
|
|
173
|
-
id: string;
|
|
174
|
-
}, Insight, Filter extends FilterType, Fetch, Signal, _CapitalizedT extends string, _Default, _DefaultInput, _DefaultState, _DefaultStateInput, _Doc, _DocInput, _QueryOfDoc, _Query, _Sort, _DynamicSliceArgMap>(gql: DbGraphQL<T, Input, Full, Light, Insight, Filter, Fetch, Signal, _CapitalizedT, _Default, _DefaultInput, _DefaultState, _DefaultStateInput, _Doc, _DocInput, _QueryOfDoc, _Query, _Sort, _DynamicSliceArgMap>) => DefaultActions<T, Input, Full, Light, Filter, Fetch, Signal, _CapitalizedT, _Default, _DefaultInput, _DefaultState, _DefaultStateInput, _Doc, _DocInput, _QueryOfDoc, _Query, _Sort, _DynamicSliceArgMap>;
|
|
175
176
|
type SingleOf<M> = M extends (infer V)[] ? V : never;
|
|
176
177
|
type SetterKey<Prefix extends string, K extends string, T extends string, _CapitalizedT extends string = Capitalize<T>, _CapitalizedK extends string = Capitalize<K>> = `${Prefix}${_CapitalizedK}On${_CapitalizedT}`;
|
|
177
178
|
type FieldFormSetter<DefaultState, T extends string, _CapitalizedT extends string = Capitalize<T>> = {
|
|
@@ -197,29 +198,41 @@ type FormSetter<Full, T extends string, _CapitalizedT extends string = Capitaliz
|
|
|
197
198
|
} & {
|
|
198
199
|
[K in `writeOn${_CapitalizedT}`]: (path: string | (string | number)[], value: any) => void;
|
|
199
200
|
};
|
|
200
|
-
interface SliceInfo<T extends string, State, Action> {
|
|
201
|
+
export interface SliceInfo<T extends string, State, Action> {
|
|
201
202
|
refName: T;
|
|
202
203
|
state: State;
|
|
203
204
|
action: Action;
|
|
204
205
|
}
|
|
205
|
-
type StoreInstance<ApplyState, ApplyAction, SliceInfoMap> = SetGet<ApplyState> & ApplyAction & {
|
|
206
|
+
export type StoreInstance<ApplyState, ApplyAction, SliceInfoMap> = SetGet<ApplyState> & ApplyAction & {
|
|
206
207
|
__STATE_INFO__: ApplyState;
|
|
207
208
|
__SLICE_INFO__: SliceInfoMap;
|
|
208
209
|
};
|
|
209
|
-
export declare
|
|
210
|
+
export declare function store<RefNameOrGql, State extends {
|
|
211
|
+
[key: string]: any;
|
|
212
|
+
}>(refNameOrGql: RefNameOrGql, state: State, ...libStores: Type[]): RefNameOrGql extends string ? Type<StoreInstance<State, {}, {}>> : RefNameOrGql extends DbGraphQL<infer T, infer Input, infer Full, infer Light, infer Insight, infer Filter, infer Fetch, infer Signal, infer _CapitalizedT, infer _Default, infer _DefaultInput, infer _DefaultState, infer _DefaultStateInput, infer _Doc, infer _DocInput, infer _QueryOfDoc, infer _Query, infer _Sort, infer _DynamicSliceArgMap> ? Type<DatabaseStore<T extends string ? T : "unknown", Input, Full extends {
|
|
213
|
+
id: string;
|
|
214
|
+
} ? Full : {
|
|
215
|
+
id: string;
|
|
216
|
+
}, Light, Insight, Filter, Fetch, Signal, State, _CapitalizedT, _Default, _DefaultInput, _DefaultState, _DefaultStateInput, _Doc, _DocInput, _QueryOfDoc, _Query, _Sort, _DynamicSliceArgMap>> : never;
|
|
217
|
+
export type DatabaseStore<T extends string, Input, Full extends {
|
|
210
218
|
id: string;
|
|
211
219
|
}, Light extends {
|
|
212
220
|
id: string;
|
|
213
221
|
}, Insight, Filter extends FilterType, Fetch, Signal, State extends {
|
|
214
222
|
[key: string]: any;
|
|
215
|
-
}, _CapitalizedT extends string = Capitalize<T>, _Default = DefaultOf<Full>, _DefaultInput = DefaultOf<Input>, _DefaultState = GetStateObject<Full>, _DefaultStateInput = GetStateObject<Input>, _Doc = DocumentModel<Full>, _DocInput = DocumentModel<Input>, _QueryOfDoc = QueryOf<DocumentModel<Full>>, _Query = GetActionObject<Filter>, _Sort = SortOf<Filter>, _DynamicSliceArgMap = DynamicSliceArgMap<T, Input, Full, Filter, Signal, _CapitalizedT, _DefaultInput, _Sort>, _CreateOption = CreateOption<Full>, _FetchInitFormWithFetchPolicy = FetchInitForm<Input, Full, Filter> & FetchPolicy, _DefaultSliceState = SliceState<T, Full, Light, [
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
+
}, _CapitalizedT extends string = Capitalize<T>, _Default = DefaultOf<Full>, _DefaultInput = DefaultOf<Input>, _DefaultState = GetStateObject<Full>, _DefaultStateInput = GetStateObject<Input>, _Doc = DocumentModel<Full>, _DocInput = DocumentModel<Input>, _QueryOfDoc = QueryOf<DocumentModel<Full>>, _Query = GetActionObject<Filter>, _Sort = SortOf<Filter>, _DynamicSliceArgMap = DynamicSliceArgMap<T, Input, Full, Filter, Signal, _CapitalizedT, _DefaultInput, _Sort>, _CreateOption = CreateOption<Full>, _FetchInitFormWithFetchPolicy = FetchInitForm<Input, Full, Filter> & FetchPolicy, _DefaultSliceState = SliceState<T, Full, Light, [
|
|
224
|
+
query: _QueryOfDoc
|
|
225
|
+
], Insight, Filter, _CapitalizedT, _Default, _Sort>, _DynamicSliceStateMap = {
|
|
226
|
+
[Suffix in keyof _DynamicSliceArgMap as Suffix extends string ? Suffix : never]: Suffix extends string ? SliceState<T, Full, Light, _DynamicSliceArgMap[Suffix], Insight, Filter, _CapitalizedT, _Default, _Sort> : never;
|
|
227
|
+
}, _DefaultSliceAction = SliceAction<T, Input, Full, Light, [
|
|
228
|
+
query: _QueryOfDoc
|
|
229
|
+
], Filter, _CapitalizedT, _Sort, _FetchInitFormWithFetchPolicy>, _DynamicSliceActionMap = {
|
|
230
|
+
[Suffix in keyof _DynamicSliceArgMap as Suffix extends string ? Suffix : never]: Suffix extends string ? _DynamicSliceArgMap[Suffix] extends any[] ? SliceAction<T, Input, Full, Light, _DynamicSliceArgMap[Suffix], Filter, _CapitalizedT, _Sort, _FetchInitFormWithFetchPolicy> : never : never;
|
|
231
|
+
}, _ApplyState = State & DefaultState<T, Input, Full, Light, Insight, Filter, Signal, _CapitalizedT, _Default, _DefaultInput, _DefaultState, _DefaultStateInput, _Doc, _DocInput, _QueryOfDoc, _Query, _Sort, _DynamicSliceArgMap, _DefaultSliceState, _DynamicSliceStateMap>, _ApplyAction = DefaultActions<T, Input, Full, Light, Filter, Fetch, Signal, _CapitalizedT, _Default, _DefaultInput, _DefaultState, _DefaultStateInput, _Doc, _DocInput, _QueryOfDoc, _Sort, _DynamicSliceArgMap, _CreateOption, _FetchInitFormWithFetchPolicy, _DefaultSliceAction, _DynamicSliceActionMap>, _SliceInfoMap = {
|
|
232
|
+
[K in T]: SliceInfo<T, _DefaultSliceState, _DefaultSliceAction>;
|
|
233
|
+
} & {
|
|
234
|
+
[Suffix in keyof _DynamicSliceStateMap & keyof _DynamicSliceActionMap as Suffix extends string ? `${T}${Suffix}` : never]: Suffix extends string ? SliceInfo<`${T}${Suffix}`, _DynamicSliceStateMap[Suffix], _DynamicSliceActionMap[Suffix]> : never;
|
|
235
|
+
}> = StoreInstance<_ApplyState, _ApplyAction, _SliceInfoMap>;
|
|
223
236
|
type SetKey<T extends string> = `set${Capitalize<T>}`;
|
|
224
237
|
export interface WithSelectors<State, Action, SliceInfoMap> {
|
|
225
238
|
sub: {
|
|
@@ -257,12 +270,9 @@ export interface SliceSelectors<T extends string, State, Action> {
|
|
|
257
270
|
}>;
|
|
258
271
|
get: () => State;
|
|
259
272
|
}
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
}
|
|
263
|
-
export declare const makeStore: <State, Action, SliceInfoMap>(st: WithSelectors<any, any, any>, storeRef: Type<StoreInstance<State, Action, SliceInfoMap>>, { library }?: MakeStoreOption) => WithSelectors<State, Action, SliceInfoMap>;
|
|
273
|
+
export type StoreOf<RootStore extends StoreInstance<any, any, any>> = RootStore extends StoreInstance<infer State, infer Action, infer SliceInfoMap> ? WithSelectors<State, Action, SliceInfoMap> : never;
|
|
274
|
+
export declare const makeStore: <State, Action, SliceInfoMap>(st: WithSelectors<any, any, any>, signals: SerializedSignal[]) => WithSelectors<State, Action, SliceInfoMap>;
|
|
264
275
|
export declare const MixStore: <T extends Type[]>(...stores: [...T]) => Type<StoreInstance<Prettify<MergeAllKeyOfTypes<T, "__STATE_INFO__">>, MergeAllTypes<T, "get" | "set" | "pick" | "__STATE_INFO__" | "__SLICE_INFO__">, Prettify<MergeAllKeyOfTypes<T, "__SLICE_INFO__">>>>;
|
|
265
|
-
export declare const rootStoreOf: <State, Action, SliceInfoMap>(store: Type<StoreInstance<State, Action, SliceInfoMap>>) => Type<StoreInstance<State, Action, SliceInfoMap>>;
|
|
266
276
|
interface ToastProps {
|
|
267
277
|
root?: string;
|
|
268
278
|
duration?: number;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { Type } from "@akanjs/base";
|
|
2
|
+
import type { SerializedSignal } from "@akanjs/signal";
|
|
3
|
+
export declare const storeInfo: {
|
|
4
|
+
store: Map<string, Type>;
|
|
5
|
+
storeRefNameMap: Map<Type, string>;
|
|
6
|
+
setRefNameTemp(refName: string, store: Type): void;
|
|
7
|
+
getRefNameTemp(store: Type): string;
|
|
8
|
+
setState(storeRef: Type, applyState: {
|
|
9
|
+
[key: string]: any;
|
|
10
|
+
}): void;
|
|
11
|
+
getState(storeRef: Type): {
|
|
12
|
+
[key: string]: any;
|
|
13
|
+
};
|
|
14
|
+
applyAction(storeRef: Type): void;
|
|
15
|
+
getAction(storeRef: Type): {
|
|
16
|
+
[key: string]: (...args: any) => void | Promise<void>;
|
|
17
|
+
};
|
|
18
|
+
register<Store extends Type>(refName: string, storeRef: Store): Store;
|
|
19
|
+
buildStore(signals: SerializedSignal[]): void;
|
|
20
|
+
};
|