Open yoriiis opened 1 month ago
PR welcome.
In https://github.com/alex-kinokon/jsx-dom/commit/6e0e7e83ba6fe5e839588620c451ae11c83536e4, the type of ReactElement
has changed in the file index.d.ts#L61.
I tested without the | DocumentFragment
and the TypeScript error does not appear locally with the following example.
document.body.insertAdjacentElement('afterbegin', <h1>OK</h1>)
However, I don't fully understand these changes and I don't know why the error appears in this example. I'd like to avoid creating another problem. Do you have more information?
Proposed changes:
# https://github.com/alex-kinokon/jsx-dom/blob/master/types/index.d.ts
- export type ReactElement = HTMLElement | SVGElement | DocumentFragment
+ export type ReactElement = HTMLElement | SVGElement
Please see #107.
Hello @alex-kinokon,
I use this package on several projects without any problems, but it seems that the latest version
8.1.5
has introduced some errors. The following codegenerates this error
With the previous version
8.1.4
there are no errors. I use the automatic runtime withjsx-dom-cjs
.I'm available if you need more info. Thanks to you