Skip to content
Source
Sign inSign up
TanStack/query
Open History to see the last commit

isCancelledError.md

30 lines506 Bytes

1---
2id: isCancelledError
3title: isCancelledError
4---
5​
6```ts
7function isCancelledError(value: any): value is CancelledError;
8```
9​
10Defined in: [packages/query-core/src/retryer.ts:136](https://github.com/TanStack/query/blob/main/packages/query-core/src/retryer.ts#L136)
11​
12Checks whether a value is a `CancelledError`.
13​
14## Parameters
15​
16### value
17​
18`any`
19​
20The value to check.
21​
22## Returns
23​
24`value is CancelledError`
25​
26`true` if `value` is a `CancelledError`.
27​
28## Deprecated
29​
30Use instanceof `CancelledError` instead.