@ethlete/query 5.27.0 → 5.28.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.
|
@@ -39,7 +39,7 @@ export type CreatePagedQueryStackOptions<TArgs extends QueryArgs, TNormPaginatio
|
|
|
39
39
|
* @param page The page to fetch next. **Do not modify this argument.**
|
|
40
40
|
* @param allResponses All responses that were fetched till now including pagination.
|
|
41
41
|
*/
|
|
42
|
-
args: (page: number, allResponses: NonNullable<ResponseType<TArgs>>[]) => RequestArgs<TArgs
|
|
42
|
+
args: (page: number, allResponses: NonNullable<ResponseType<TArgs>>[]) => RequestArgs<TArgs> | null;
|
|
43
43
|
/**
|
|
44
44
|
* The features that should be used for all queries in the stack.
|
|
45
45
|
*
|
|
@@ -62,7 +62,10 @@ export type Query<TArgs extends QueryArgs> = QueryBase<TArgs> & {
|
|
|
62
62
|
createSnapshot: () => QuerySnapshot<TArgs>;
|
|
63
63
|
/** Resets the query state to its initial state */
|
|
64
64
|
reset: () => void;
|
|
65
|
+
/** Returns a readonly version of the query */
|
|
66
|
+
asReadonly: () => ReadonlyQuery<TArgs>;
|
|
65
67
|
/** Advanced query features. **WARNING!** Incorrectly using these features will likely **BREAK** your application. You have been warned! */
|
|
66
68
|
subtle: QuerySubtle<TArgs>;
|
|
67
69
|
};
|
|
70
|
+
export type ReadonlyQuery<TArgs extends QueryArgs> = Omit<Query<TArgs>, 'execute' | 'subtle' | 'reset' | 'asReadonly'>;
|
|
68
71
|
export declare const createQuery: <TArgs extends QueryArgs>(options: CreateQueryOptions<TArgs>) => Query<TArgs>;
|