Closed kuoruan closed 2 years ago
The source files: https://codesandbox.io/s/quirky-agnesi-dnn33?file=/src/index.tsx
I'm using js-dom with babel React Automatic Runtime, but how can i import the jsx-dom types?
js-dom
React Automatic Runtime
I have created a jsx-env.d.ts with content:
jsx-env.d.ts
/// <reference types="jsx-dom" />
But it still rise the error that cannot find JSX.IntrinsicElements
JSX.IntrinsicElements
Found a way to fix this: https://stackoverflow.com/a/43792209
import { JSX } from "jsx-dom"; export as namespace JSX; export = JSX;
The source files: https://codesandbox.io/s/quirky-agnesi-dnn33?file=/src/index.tsx
I'm using
js-dom
with babelReact Automatic Runtime
, but how can i import the jsx-dom types?I have created a
jsx-env.d.ts
with content:But it still rise the error that cannot find
JSX.IntrinsicElements