Skip to content

Commit cd58687

Browse files
committed
add ts-ignore and extend never
1 parent 885c960 commit cd58687

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

types/index.d.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import {
88
Config as ConfigDTL,
99
} from '@testing-library/dom'
1010
import {act as reactDeprecatedAct} from 'react-dom/test-utils'
11+
//@ts-ignore
1112
import {act as reactAct} from 'react'
1213

1314
export * from '@testing-library/dom'
@@ -250,6 +251,6 @@ export function cleanup(): void
250251
* If that's not available (older version of react) then it
251252
* simply calls the deprecated version which is ReactTestUtils.act(cb)
252253
*/
253-
export const act: typeof reactAct extends undefined
254+
export const act: typeof reactAct extends never
254255
? typeof reactDeprecatedAct
255256
: typeof reactAct

0 commit comments

Comments
 (0)