You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The inferred type of 'renderWithTheme' cannot be named without a reference to @types/testing-library__dom/queries'. This is likely not portable. A type annotation is necessary. #587
import{render}from'@testing-library/react'import{withTheme}from'./withTheme'exportconstrenderWithTheme=(component: React.ReactElement)=>render(withTheme(component))// No matter withTheme or just render, same error
What you did:
What happened:
Reproduction:
Install Typescript
Install @testing-library/react
Add any function that takes component and returns render(component)
I tried yarn as well as the pnpm, the result is the same all the time.
Cannot compile declarations with this error:
The inferred type of 'renderWithTheme' cannot be named without a reference to '../../../../common/temp/node_modules/.pnpm/registry.npmjs.org/@types/testing-library__react/9.1.2/node_modules/@types/testing-library__dom/queries'. This is likely not portable. A type annotation is necessary.