Skip to content

Commit 388fb9a

Browse files
committed
chore: turn on noUncheckedIndexedAccess compiler flag
use a const assertion over the bang operator so that we can safely access pages[0]
1 parent f9fab4f commit 388fb9a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/core/tests/queryClient.test.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -344,10 +344,10 @@ describe('queryClient', () => {
344344
const data = {
345345
pages: ['data'],
346346
pageParams: [undefined],
347-
}
347+
} as const
348348

349349
const fetchFn: QueryFunction<StrictData, StrictQueryKey> = () =>
350-
Promise.resolve(data.pages[0]!)
350+
Promise.resolve(data.pages[0])
351351

352352
await expect(
353353
queryClient.fetchInfiniteQuery<

0 commit comments

Comments
 (0)