jsx.d.ts 588 B

1234567891011121314151617
  1. /**
  2. * This file only exists because in react 19, the JSX namespace was moved under
  3. * the React export. However, some libraries (e.g. react-markdown) still have
  4. * some things typed as `JSX.<Something>`. Until those libraries update to
  5. * import the namespace correctly, we'll need this declaration file in place to
  6. * expose JSX via the old global location.
  7. */
  8. import type { JSX as Jsx } from "react/jsx-runtime";
  9. declare global {
  10. namespace JSX {
  11. type ElementClass = Jsx.ElementClass;
  12. type Element = Jsx.Element;
  13. type IntrinsicElements = Jsx.IntrinsicElements;
  14. }
  15. }