Skip to content

Commit

Permalink
chore: Replace @ts-ignore with @ts-expect-error (#6866)
Browse files Browse the repository at this point in the history
  • Loading branch information
lachlancollins committed Feb 10, 2024
1 parent 8cd6441 commit e105930
Show file tree
Hide file tree
Showing 8 changed files with 6 additions and 10 deletions.
2 changes: 1 addition & 1 deletion docs/framework/react/devtools.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ function App() {
const [showDevtools, setShowDevtools] = React.useState(false)

React.useEffect(() => {
// @ts-ignore
// @ts-expect-error
window.toggleDevtools = () => setShowDevtools((old) => !old)
}, [])

Expand Down
2 changes: 1 addition & 1 deletion packages/angular-query-experimental/src/signal-proxy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export function signalProxy<TInput extends Record<string | symbol, any>>(
if (typeof targetField === 'function') return targetField

// finally, create a computed field, store it and return it
// @ts-ignore
// @ts-expect-error
return (target[prop] = computed(() => inputSignal()[prop]))
},
has(_, prop) {
Expand Down
3 changes: 0 additions & 3 deletions packages/query-devtools/src/Devtools.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2101,7 +2101,6 @@ const createSubscribeToQueryCacheBatcher = <T,>(
})

onCleanup(() => {
// @ts-ignore
queryCacheMap.delete(callback)
})

Expand Down Expand Up @@ -2153,11 +2152,9 @@ const createSubscribeToMutationCacheBatcher = <T,>(
setValue(callback(mutationCache))
})

// @ts-ignore
mutationCacheMap.set(callback, setValue)

onCleanup(() => {
// @ts-ignore
mutationCacheMap.delete(callback)
})

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ function setupPersister(
const context = {
meta: { foo: 'bar' },
queryKey,
// @ts-ignore
// @ts-expect-error
signal: undefined as AbortSignal,
}
const queryHash = hashKey(queryKey)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ describe('React hydration', () => {
// Never resolve
})

// @ts-ignore
// @ts-expect-error
return null
}

Expand Down
1 change: 0 additions & 1 deletion packages/react-query/src/__tests__/ssr.test.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { describe, expect, it, vi } from 'vitest'
import * as React from 'react'
// @ts-ignore
import { renderToString } from 'react-dom/server'
import { QueryCache, QueryClientProvider, useInfiniteQuery, useQuery } from '..'
import { createQueryClient, queryKey, sleep } from './utils'
Expand Down
2 changes: 1 addition & 1 deletion packages/react-query/src/__tests__/useQuery.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ describe('useQuery', () => {
it('should return the correct types', () => {
const key = queryKey()

// @ts-ignore
// @ts-expect-error
function Page() {
// unspecified query function should default to unknown
const noQueryFn = useQuery({ queryKey: key })
Expand Down
2 changes: 1 addition & 1 deletion packages/svelte-query/src/createQueries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ export function createQueries<

const { subscribe } = derived(
[result, defaultedQueriesStore],
// @ts-ignore svelte-check thinks this is unused
// @ts-expect-error svelte-check thinks this is unused
([$result, $defaultedQueriesStore]) => {
const [rawResult, combineResult, trackResult] =
observer.getOptimisticResult(
Expand Down

0 comments on commit e105930

Please sign in to comment.