Skip to content

Commit 4c93bbc

Browse files
committed
fix: rename exported interface
I noticed when manually inspecting the bundled declaration files, the interfaces weren't being renamed according to how I was importing them in the source file: import type { IntrinsicElements as DefinedIntrinsicElements } from '...' So the `IntrinsicElements` interface was recursively referencing itself in the JSX namespace because it was all bundled together in the same file. So in an abundance of caution, I just renamed it just to be safe.
1 parent a367b53 commit 4c93bbc

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/jsx/intrinsic-elements.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1513,9 +1513,11 @@ interface WebViewHTMLAttributes<T> extends HTMLAttributes<T> {
15131513
}
15141514

15151515
/**
1516-
* Subset of HTML properties that Satori supports.
1516+
* Subset of HTML elements that Satori supports.
1517+
*
1518+
* @todo remove unsupported elements.
15171519
*/
1518-
export interface IntrinsicElements {
1520+
export interface DefinedIntrinsicElements {
15191521
// HTML
15201522
a: DetailedHTMLProps<
15211523
AnchorHTMLAttributes<HTMLAnchorElement>,

src/jsx/jsx-runtime.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
* @see {@link https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/react/jsx-runtime.d.ts React typings for `jsx-runtime`}
1313
*/
1414
import type { JSXElement, JSXKey, FC } from './types.js'
15-
import type { IntrinsicElements as DefinedIntrinsicElements } from './intrinsic-elements.js'
15+
import type { DefinedIntrinsicElements } from './intrinsic-elements.js'
1616

1717
export namespace JSX {
1818
/**

0 commit comments

Comments
 (0)