diff --git a/src/jsx/intrinsic-elements.ts b/src/jsx/intrinsic-elements.ts index cb66f45c..dd15aeb5 100644 --- a/src/jsx/intrinsic-elements.ts +++ b/src/jsx/intrinsic-elements.ts @@ -287,7 +287,7 @@ export namespace JSX { interface EmbedHTMLAttributes extends HTMLAttributes { height?: number | string | undefined src?: string | undefined - type?: string | undefined + type?: StringLiteralUnion | undefined width?: number | string | undefined } @@ -495,7 +495,7 @@ export namespace JSX { imagesizes?: string | undefined referrerpolicy?: HTMLAttributeReferrerPolicy | undefined sizes?: string | undefined - type?: string | undefined + type?: StringLiteralUnion | undefined charSet?: string | undefined // React 19 compatibility @@ -607,7 +607,7 @@ export namespace JSX { form?: string | undefined height?: number | string | undefined name?: string | undefined - type?: string | undefined + type?: StringLiteralUnion | undefined usemap?: string | undefined width?: number | string | undefined } @@ -658,7 +658,10 @@ export namespace JSX { nomodule?: boolean | undefined referrerpolicy?: HTMLAttributeReferrerPolicy | undefined src?: string | undefined - type?: string | undefined + /** + * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script/type + */ + type?: StringLiteralUnion<'' | 'text/javascript' | 'importmap' | 'module'> | undefined // React 19 compatibility crossOrigin?: CrossOrigin @@ -681,20 +684,24 @@ export namespace JSX { value?: string | ReadonlyArray | number | undefined } + type MediaMime = BaseMime & (`image/${string}` | `audio/${string}` | `video/${string}`) interface SourceHTMLAttributes extends HTMLAttributes { height?: number | string | undefined media?: string | undefined sizes?: string | undefined src?: string | undefined srcset?: string | undefined - type?: string | undefined + type?: StringLiteralUnion | undefined width?: number | string | undefined } interface StyleHTMLAttributes extends HTMLAttributes { media?: string | undefined scoped?: boolean | undefined - type?: string | undefined + /** + * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/style#type + */ + type?: '' | 'text/css' | undefined // React 19 compatibility href?: string | undefined