@tanstack/query-core 4.39.1 → 4.39.2
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/build/lib/types.d.ts +1 -0
- package/package.json +1 -1
- package/src/types.ts +5 -0
package/build/lib/types.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ import type { QueryCache } from './queryCache';
|
|
|
6
6
|
import type { MutationCache } from './mutationCache';
|
|
7
7
|
import type { Logger } from './logger';
|
|
8
8
|
export declare type NonUndefinedGuard<T> = T extends undefined ? never : T;
|
|
9
|
+
export declare type DistributiveOmit<TObject, TKey extends keyof TObject> = TObject extends any ? Omit<TObject, TKey> : never;
|
|
9
10
|
export declare type OmitKeyof<TObject, TKey extends TStrictly extends 'safely' ? keyof TObject | (string & Record<never, never>) | (number & Record<never, never>) | (symbol & Record<never, never>) : keyof TObject, TStrictly extends 'strictly' | 'safely' = 'strictly'> = Omit<TObject, TKey>;
|
|
10
11
|
export declare type QueryKey = readonly unknown[];
|
|
11
12
|
export declare type QueryFunction<T = unknown, TQueryKey extends QueryKey = QueryKey, TPageParam = any> = (context: QueryFunctionContext<TQueryKey, TPageParam>) => T | Promise<T>;
|
package/package.json
CHANGED
package/src/types.ts
CHANGED
|
@@ -10,6 +10,11 @@ import type { Logger } from './logger'
|
|
|
10
10
|
|
|
11
11
|
export type NonUndefinedGuard<T> = T extends undefined ? never : T
|
|
12
12
|
|
|
13
|
+
export type DistributiveOmit<
|
|
14
|
+
TObject,
|
|
15
|
+
TKey extends keyof TObject,
|
|
16
|
+
> = TObject extends any ? Omit<TObject, TKey> : never
|
|
17
|
+
|
|
13
18
|
export type OmitKeyof<
|
|
14
19
|
TObject,
|
|
15
20
|
TKey extends TStrictly extends 'safely'
|