We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
retry.test-d.ts
1 parent f6d812c commit c76527dCopy full SHA for c76527d
packages/toolkit/src/query/tests/retry.test-d.ts
@@ -1,10 +1,12 @@
1
-describe('RetryOptions type tests', () => {
+import type { RetryOptions } from '@internal/query/retry'
2
+
3
+describe('type tests', () => {
4
test('RetryOptions only accepts one of maxRetries or retryCondition', () => {
- // @ts-expect-error Should complain if both exist at once
- const ro: RetryOptions = {
5
+ // Should complain if both `maxRetries` and `retryCondition` exist at once
6
+ expectTypeOf<RetryOptions>().not.toMatchTypeOf({
7
maxRetries: 5,
8
retryCondition: () => false,
- }
9
+ })
10
})
11
12
0 commit comments