alex-kinokon / jsx-dom

Use JSX to create DOM elements.
BSD 3-Clause "New" or "Revised" License
277 stars 30 forks source link

More exported types #68

Closed KapitanOczywisty closed 10 months ago

KapitanOczywisty commented 2 years ago

I've exported with patch-package a few types, which are useful when creating own JSX components: ClassName, PropsWithChildren<T>, ReactNode, ReactElement and probably more in the future. In React all these are accessible via React namespace.

As a side note, since JSX tags are not properly recognized by typescript, I've ended up replacing following definition: export type ReactElement = HTMLElement (removed SVG). Otherwise it'd be a mess to use jsx-dom with libs like jQuery.