Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions jsx.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import type * as React from 'react';

// Global mapping for deprecated JSX namespace → React.JSX (React 19)
// https://react.dev/blog/2024/04/25/react-19-upgrade-guide#the-jsx-namespace-in-typescript
declare global {
namespace JSX {
type Element = React.JSX.Element;
type ElementClass = React.JSX.ElementClass;
type ElementAttributesProperty = React.JSX.ElementAttributesProperty;
type ElementChildrenAttribute = React.JSX.ElementChildrenAttribute;
type IntrinsicElements = React.JSX.IntrinsicElements;
type IntrinsicAttributes = React.JSX.IntrinsicAttributes;
type IntrinsicClassAttributes<T> = React.JSX.IntrinsicClassAttributes<T>;
}
}
Loading