@astral/mobx-query 1.1.0 → 1.2.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/MobxQuery/MobxQuery.d.ts +4 -4
- package/package.json +1 -1
- package/types.d.ts +1 -1
package/MobxQuery/MobxQuery.d.ts
CHANGED
|
@@ -21,7 +21,7 @@ type CreateInfiniteQueryParams<TResult, TError> = Omit<InfiniteQueryParams<TResu
|
|
|
21
21
|
/**
|
|
22
22
|
* @description Сервис, позволяющий кэшировать данные.
|
|
23
23
|
*/
|
|
24
|
-
export declare class MobxQuery {
|
|
24
|
+
export declare class MobxQuery<TDefaultError = void> {
|
|
25
25
|
/**
|
|
26
26
|
* @description объект соответствия хешей ключей и их значений
|
|
27
27
|
*/
|
|
@@ -70,14 +70,14 @@ export declare class MobxQuery {
|
|
|
70
70
|
/**
|
|
71
71
|
* @description метод создания стора, кешируется
|
|
72
72
|
*/
|
|
73
|
-
createQuery: <TResult, TError>(key: CacheKey[], executor: QueryExecutor<TResult>, params?: CreateQueryParams<TResult, TError> | undefined) => Query<TResult, TError>;
|
|
73
|
+
createQuery: <TResult, TError = TDefaultError>(key: CacheKey[], executor: QueryExecutor<TResult>, params?: CreateQueryParams<TResult, TError> | undefined) => Query<TResult, TError>;
|
|
74
74
|
/**
|
|
75
75
|
* @description метод создания инфинит стора, кешируется
|
|
76
76
|
*/
|
|
77
|
-
createInfiniteQuery: <TResult, TError>(key: CacheKey[], executor: InfiniteExecutor<TResult>, params?: CreateInfiniteQueryParams<TResult, TError> | undefined) => InfiniteQuery<TResult, TError>;
|
|
77
|
+
createInfiniteQuery: <TResult, TError = TDefaultError>(key: CacheKey[], executor: InfiniteExecutor<TResult>, params?: CreateInfiniteQueryParams<TResult, TError> | undefined) => InfiniteQuery<TResult, TError>;
|
|
78
78
|
/**
|
|
79
79
|
* @description метод создания мутации, не кешируется
|
|
80
80
|
*/
|
|
81
|
-
createMutation: <TResult, TError, TExecutorParams>(executor: MutationExecutor<TResult, TExecutorParams>, params?: MutationParams<TResult, TError> | undefined) => Mutation<TResult, TError, TExecutorParams>;
|
|
81
|
+
createMutation: <TResult, TError = TDefaultError, TExecutorParams = void>(executor: MutationExecutor<TResult, TExecutorParams>, params?: MutationParams<TResult, TError> | undefined) => Mutation<TResult, TError, TExecutorParams>;
|
|
82
82
|
}
|
|
83
83
|
export {};
|
package/package.json
CHANGED
package/types.d.ts
CHANGED
|
@@ -46,6 +46,6 @@ export type FetchPolicy = 'network-only' | 'cache-first';
|
|
|
46
46
|
/**
|
|
47
47
|
* @description ключ для кешированя
|
|
48
48
|
*/
|
|
49
|
-
export type CacheKey = string |
|
|
49
|
+
export type CacheKey = string | number | boolean | null | undefined | CacheKey[] | {
|
|
50
50
|
[key: string]: CacheKey;
|
|
51
51
|
};
|