Skip to content

Commit 04a8c0b

Browse files
committed
Remove some // @ts-ignore directives
1 parent cf676e8 commit 04a8c0b

File tree

4 files changed

+3
-11
lines changed

4 files changed

+3
-11
lines changed

src/components/Provider.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,6 @@ function Provider<A extends Action<string> = UnknownAction, S = unknown>({
9191

9292
const Context = context || ReactReduxContext
9393

94-
// @ts-ignore 'AnyAction' is assignable to the constraint of type 'A', but 'A' could be instantiated with a different subtype
9594
return <Context.Provider value={contextValue}>{children}</Context.Provider>
9695
}
9796

src/components/connect.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -519,7 +519,6 @@ function connect<
519519
WrappedComponent,
520520
// @ts-ignore
521521
initMapStateToProps,
522-
// @ts-ignore
523522
initMapDispatchToProps,
524523
initMergeProps,
525524
areStatesEqual,

src/utils/react.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
import * as ReactOriginal from 'react'
21
import type * as ReactNamespace from 'react'
2+
import * as ReactOriginal from 'react'
33

44
export const React: typeof ReactNamespace =
55
// prettier-ignore
6-
// @ts-ignore
76
'default' in ReactOriginal ? ReactOriginal['default'] : ReactOriginal as any

test/integration/dynamic-reducers.spec.tsx

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -180,10 +180,7 @@ describe('React', () => {
180180
// This generates errors for using useLayoutEffect in v7
181181
// We hide that error by disabling console.error here
182182

183-
vi.spyOn(console, 'error')
184-
// eslint-disable-next-line no-console
185-
// @ts-ignore
186-
console.error.mockImplementation(() => {})
183+
const consoleErrorSpy = vi.spyOn(console, 'error').mockImplementation(() => {})
187184

188185
const markup = ReactDOMServer.renderToString(
189186
<Provider store={store}>
@@ -199,9 +196,7 @@ describe('React', () => {
199196
expect(markup).toContain('Hello world')
200197
expect(markup).toContain('Hello dynamic world')
201198

202-
// eslint-disable-next-line no-console
203-
// @ts-ignore
204-
console.error.mockRestore()
199+
consoleErrorSpy.mockRestore()
205200
})
206201
})
207202
})

0 commit comments

Comments
 (0)