@akanjs/store 0.0.142 → 0.0.144
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/package.json +1 -1
- package/src/storeDecorators.d.ts +5 -5
package/package.json
CHANGED
package/src/storeDecorators.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DataList, type Dayjs, Type } from "@akanjs/base";
|
|
1
|
+
import { DataList, type Dayjs, type Prettify, Type } from "@akanjs/base";
|
|
2
2
|
import { type FetchPolicy } from "@akanjs/common";
|
|
3
3
|
import { DocumentModel, type FilterType, type GetStateObject, ProtoFile, QueryOf, type SortOf } from "@akanjs/constant";
|
|
4
4
|
import { DbGraphQL, DefaultOf, FetchInitForm, FieldState, FilterListArgs, FilterStateArgs, SliceMeta } from "@akanjs/signal";
|
|
@@ -211,7 +211,7 @@ interface StoreDecoratorInput {
|
|
|
211
211
|
}
|
|
212
212
|
export declare const Store: (returnsOrObj: (() => Type) | StoreDecoratorInput) => (target: Type) => void;
|
|
213
213
|
type SetKey<T extends string> = `set${Capitalize<T>}`;
|
|
214
|
-
type WithSelectors<SA> = {
|
|
214
|
+
type WithSelectors<SA> = Prettify<{
|
|
215
215
|
sub: {
|
|
216
216
|
(listener: (selectedState: SA, previousSelectedState: SA) => void): () => void;
|
|
217
217
|
<U>(selector: (state: SA) => U, listener: (selectedState: U, previousSelectedState: U) => void, options?: {
|
|
@@ -228,11 +228,11 @@ type WithSelectors<SA> = {
|
|
|
228
228
|
[K in keyof SA as SA[K] extends (...args: any) => any ? never : K]: () => SA[K];
|
|
229
229
|
};
|
|
230
230
|
} & {
|
|
231
|
-
do: {
|
|
231
|
+
do: Prettify<{
|
|
232
232
|
[K in keyof SA as SA[K] extends (...args: any) => any ? K : never]: SA[K];
|
|
233
233
|
} & {
|
|
234
234
|
[K in keyof SA as SA[K] extends (...args: any) => any ? never : SetKey<K & string>]: (value: FieldState<SA[K]>) => void;
|
|
235
|
-
}
|
|
235
|
+
}>;
|
|
236
236
|
} & {
|
|
237
237
|
get: () => SA;
|
|
238
238
|
} & {
|
|
@@ -241,7 +241,7 @@ type WithSelectors<SA> = {
|
|
|
241
241
|
slice: {
|
|
242
242
|
[K in keyof SA as K extends `__SLICE__${infer S}` ? S : never]: SA[K];
|
|
243
243
|
};
|
|
244
|
-
}
|
|
244
|
+
}>;
|
|
245
245
|
interface MakeStoreOption {
|
|
246
246
|
library?: boolean;
|
|
247
247
|
}
|