Skip to content

Commit 6213ffa

Browse files
authored
fix(react-query): mark deprecated jsdoc on suspense option of UseQueryOptions (#9360)
1 parent 1f9cf0b commit 6213ffa

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

packages/react-query/src/types.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,15 @@ export interface UseQueryOptions<
4343
TData,
4444
TQueryFnData,
4545
TQueryKey
46-
> {}
46+
> {
47+
/**
48+
* If set to `true`, the query will suspend when `status === 'loading'`
49+
* and throw errors when `status === 'error'`.
50+
* Defaults to `false`.
51+
* @deprecated This option will be removed in the next major version.
52+
*/
53+
suspense?: boolean
54+
}
4755

4856
export type UseSuspenseQueryOptions<
4957
TQueryFnData = unknown,

0 commit comments

Comments
 (0)