solid-js
Version:
A declarative JavaScript library for building user interfaces.
1,159 lines (1,124 loc) • 164 kB
TypeScript
/**
THIS FILE IS GENERATED BY `./jsx-update.mjs`.
PLEASE UPDATE `jsx-h.d.ts` INSTEAD AND RUN `node jsx-update.mjs`.
*/
import * as csstype from "csstype";
/**
* Based on JSX types for Surplus and Inferno and adapted for `dom-expressions`.
*
* https://github.com/adamhaile/surplus/blob/master/index.d.ts
* https://github.com/infernojs/inferno/blob/master/packages/inferno/src/core/types.ts
*
* MathML typings coming mostly from Preact
* https://github.com/preactjs/preact/blob/07dc9f324e58569ce66634aa03fe8949b4190358/src/jsx.d.ts#L2575
*
* Checked against other frameworks via the following table:
* https://potahtml.github.io/namespace-jsx-project/index.html
*/
type DOMElement = Element;
export namespace JSX {
// START - difference between `jsx.d.ts` and `jsx-h.d.ts`
type FunctionMaybe<T = unknown> = { (): T } | T;
interface FunctionElement {
(): Element;
}
type Element = Node | ArrayElement | (string & {}) | number | boolean | null | undefined;
// END - difference between `jsx.d.ts` and `jsx-h.d.ts`
interface ArrayElement extends Array<Element> {}
interface ElementClass {
// empty, libs can define requirements downstream
}
interface ElementAttributesProperty {
// empty, libs can define requirements downstream
}
interface ElementChildrenAttribute {
children: {};
}
// Event handlers
interface EventHandler<T, E extends Event> {
(
e: E & {
currentTarget: T;
target: DOMElement;
}
): void;
}
interface BoundEventHandler<
T,
E extends Event,
EHandler extends EventHandler<T, any> = EventHandler<T, E>
> {
0: (data: any, ...e: Parameters<EHandler>) => void;
1: any;
}
type EventHandlerUnion<
T,
E extends Event,
EHandler extends EventHandler<T, any> = EventHandler<T, E>
> = EHandler | BoundEventHandler<T, E, EHandler>;
interface EventHandlerWithOptions<T, E extends Event, EHandler = EventHandler<T, E>>
extends AddEventListenerOptions {
handleEvent: EHandler;
}
type EventHandlerWithOptionsUnion<
T,
E extends Event,
EHandler extends EventHandler<T, any> = EventHandler<T, E>
> = EHandler | EventHandlerWithOptions<T, E, EHandler>;
interface InputEventHandler<T, E extends InputEvent> {
(
e: E & {
currentTarget: T;
target: T extends HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement
? T
: DOMElement;
}
): void;
}
type InputEventHandlerUnion<T, E extends InputEvent> = EventHandlerUnion<
T,
E,
InputEventHandler<T, E>
>;
interface ChangeEventHandler<T, E extends Event> {
(
e: E & {
currentTarget: T;
target: T extends HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement
? T
: DOMElement;
}
): void;
}
type ChangeEventHandlerUnion<T, E extends Event> = EventHandlerUnion<
T,
E,
ChangeEventHandler<T, E>
>;
interface FocusEventHandler<T, E extends FocusEvent> {
(
e: E & {
currentTarget: T;
target: T extends HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement
? T
: DOMElement;
}
): void;
}
type FocusEventHandlerUnion<T, E extends FocusEvent> = EventHandlerUnion<
T,
E,
FocusEventHandler<T, E>
>;
// end event handlers
const SERIALIZABLE: unique symbol;
interface SerializableAttributeValue {
toString(): string;
[SERIALIZABLE]: never;
}
interface IntrinsicAttributes {
ref?: unknown | ((e: unknown) => void) | undefined;
}
interface CustomAttributes<T> {
ref?: T | ((el: T) => void) | undefined;
classList?:
| {
[k: string]: boolean | undefined;
}
| undefined;
$ServerOnly?: boolean | undefined;
}
type Accessor<T> = () => T;
interface Directives {}
interface DirectiveFunctions {
[x: string]: (el: DOMElement, accessor: Accessor<any>) => void;
}
interface ExplicitProperties {}
interface ExplicitAttributes {}
interface ExplicitBoolAttributes {}
interface CustomEvents {}
/** @deprecated Replaced by CustomEvents */
interface CustomCaptureEvents {}
type DirectiveAttributes = {
[Key in keyof Directives as `use:${Key}`]?: Directives[Key];
};
type DirectiveFunctionAttributes<T> = {
[K in keyof DirectiveFunctions as string extends K
? never
: `use:${K}`]?: DirectiveFunctions[K] extends (
el: infer E, // will be unknown if not provided
...rest: infer R // use rest so that we can check whether it's provided or not
) => void
? T extends E // everything extends unknown if E is unknown
? R extends [infer A] // check if has accessor provided
? A extends Accessor<infer V>
? V // it's an accessor
: never // it isn't, type error
: true // no accessor provided
: never // T is the wrong element
: never; // it isn't a function
};
type PropAttributes = {
[Key in keyof ExplicitProperties as `prop:${Key}`]?: ExplicitProperties[Key];
};
type AttrAttributes = {
[Key in keyof ExplicitAttributes as `attr:${Key}`]?: ExplicitAttributes[Key];
};
type BoolAttributes = {
[Key in keyof ExplicitBoolAttributes as `bool:${Key}`]?: ExplicitBoolAttributes[Key];
};
type OnAttributes<T> = {
[Key in keyof CustomEvents as `on:${Key}`]?: EventHandlerWithOptionsUnion<T, CustomEvents[Key]>;
};
type OnCaptureAttributes<T> = {
[Key in keyof CustomCaptureEvents as `oncapture:${Key}`]?: EventHandler<
T,
CustomCaptureEvents[Key]
>;
};
// events
interface ElementEventMap<T> {
onFullscreenChange?: EventHandlerUnion<T, Event> | undefined;
onFullscreenError?: EventHandlerUnion<T, Event> | undefined;
"on:fullscreenchange"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
"on:fullscreenerror"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
onfullscreenchange?: EventHandlerUnion<T, Event> | undefined;
onfullscreenerror?: EventHandlerUnion<T, Event> | undefined;
}
interface WindowEventMap<T> {
onAfterPrint?: EventHandlerUnion<T, Event> | undefined;
onBeforePrint?: EventHandlerUnion<T, Event> | undefined;
onBeforeUnload?: EventHandlerUnion<T, BeforeUnloadEvent> | undefined;
onGamepadConnected?: EventHandlerUnion<T, GamepadEvent> | undefined;
onGamepadDisconnected?: EventHandlerUnion<T, GamepadEvent> | undefined;
onHashchange?: EventHandlerUnion<T, HashChangeEvent> | undefined;
onLanguageChange?: EventHandlerUnion<T, Event> | undefined;
onMessage?: EventHandlerUnion<T, MessageEvent> | undefined;
onMessageError?: EventHandlerUnion<T, MessageEvent> | undefined;
onOffline?: EventHandlerUnion<T, Event> | undefined;
onOnline?: EventHandlerUnion<T, Event> | undefined;
onPageHide?: EventHandlerUnion<T, PageTransitionEvent> | undefined;
// TODO `PageRevealEvent` is currently undefined on TS
onPageReveal?: EventHandlerUnion<T, Event> | undefined;
onPageShow?: EventHandlerUnion<T, PageTransitionEvent> | undefined;
// TODO `PageSwapEvent` is currently undefined on TS
onPageSwap?: EventHandlerUnion<T, Event> | undefined;
onPopstate?: EventHandlerUnion<T, PopStateEvent> | undefined;
onRejectionHandled?: EventHandlerUnion<T, PromiseRejectionEvent> | undefined;
onStorage?: EventHandlerUnion<T, StorageEvent> | undefined;
onUnhandledRejection?: EventHandlerUnion<T, PromiseRejectionEvent> | undefined;
onUnload?: EventHandlerUnion<T, Event> | undefined;
onafterprint?: EventHandlerUnion<T, Event> | undefined;
onbeforeprint?: EventHandlerUnion<T, Event> | undefined;
onbeforeunload?: EventHandlerUnion<T, BeforeUnloadEvent> | undefined;
ongamepadconnected?: EventHandlerUnion<T, GamepadEvent> | undefined;
ongamepaddisconnected?: EventHandlerUnion<T, GamepadEvent> | undefined;
onhashchange?: EventHandlerUnion<T, HashChangeEvent> | undefined;
onlanguagechange?: EventHandlerUnion<T, Event> | undefined;
onmessage?: EventHandlerUnion<T, MessageEvent> | undefined;
onmessageerror?: EventHandlerUnion<T, MessageEvent> | undefined;
onoffline?: EventHandlerUnion<T, Event> | undefined;
ononline?: EventHandlerUnion<T, Event> | undefined;
onpagehide?: EventHandlerUnion<T, PageTransitionEvent> | undefined;
// TODO `PageRevealEvent` is currently undefined in TS
onpagereveal?: EventHandlerUnion<T, Event> | undefined;
onpageshow?: EventHandlerUnion<T, PageTransitionEvent> | undefined;
// TODO `PageSwapEvent` is currently undefined in TS
onpageswap?: EventHandlerUnion<T, Event> | undefined;
onpopstate?: EventHandlerUnion<T, PopStateEvent> | undefined;
onrejectionhandled?: EventHandlerUnion<T, PromiseRejectionEvent> | undefined;
onstorage?: EventHandlerUnion<T, StorageEvent> | undefined;
onunhandledrejection?: EventHandlerUnion<T, PromiseRejectionEvent> | undefined;
onunload?: EventHandlerUnion<T, Event> | undefined;
"on:afterprint"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
"on:beforeprint"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
"on:beforeunload"?: EventHandlerWithOptionsUnion<T, BeforeUnloadEvent> | undefined;
"on:gamepadconnected"?: EventHandlerWithOptionsUnion<T, GamepadEvent> | undefined;
"on:gamepaddisconnected"?: EventHandlerWithOptionsUnion<T, GamepadEvent> | undefined;
"on:hashchange"?: EventHandlerWithOptionsUnion<T, HashChangeEvent> | undefined;
"on:languagechange"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
"on:message"?: EventHandlerWithOptionsUnion<T, MessageEvent> | undefined;
"on:messageerror"?: EventHandlerWithOptionsUnion<T, MessageEvent> | undefined;
"on:offline"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
"on:online"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
"on:pagehide"?: EventHandlerWithOptionsUnion<T, PageTransitionEvent> | undefined;
// TODO `PageRevealEvent` is currently undefined in TS
"on:pagereveal"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
"on:pageshow"?: EventHandlerWithOptionsUnion<T, PageTransitionEvent> | undefined;
// TODO `PageSwapEvent` is currently undefined in TS
"on:pageswap"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
"on:popstate"?: EventHandlerWithOptionsUnion<T, PopStateEvent> | undefined;
"on:rejectionhandled"?: EventHandlerWithOptionsUnion<T, PromiseRejectionEvent> | undefined;
"on:storage"?: EventHandlerWithOptionsUnion<T, StorageEvent> | undefined;
"on:unhandledrejection"?: EventHandlerWithOptionsUnion<T, PromiseRejectionEvent> | undefined;
"on:unload"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
}
interface CustomEventHandlersCamelCase<T> {
onAbort?: EventHandlerUnion<T, UIEvent> | undefined;
onAnimationCancel?: EventHandlerUnion<T, AnimationEvent> | undefined;
onAnimationEnd?: EventHandlerUnion<T, AnimationEvent> | undefined;
onAnimationIteration?: EventHandlerUnion<T, AnimationEvent> | undefined;
onAnimationStart?: EventHandlerUnion<T, AnimationEvent> | undefined;
onAuxClick?: EventHandlerUnion<T, PointerEvent> | undefined;
onBeforeInput?: InputEventHandlerUnion<T, InputEvent> | undefined;
onBeforeToggle?: EventHandlerUnion<T, ToggleEvent> | undefined;
onBlur?: FocusEventHandlerUnion<T, FocusEvent> | undefined;
onCancel?: EventHandlerUnion<T, Event> | undefined;
onCanPlay?: EventHandlerUnion<T, Event> | undefined;
onCanPlayThrough?: EventHandlerUnion<T, Event> | undefined;
onChange?: ChangeEventHandlerUnion<T, Event> | undefined;
onClick?: EventHandlerUnion<T, MouseEvent> | undefined;
// TODO `CommandEvent` is currently undefined in TS
onCommand?: EventHandlerUnion<T, Event> | undefined;
onCompositionEnd?: EventHandlerUnion<T, CompositionEvent> | undefined;
onCompositionStart?: EventHandlerUnion<T, CompositionEvent> | undefined;
onCompositionUpdate?: EventHandlerUnion<T, CompositionEvent> | undefined;
onContextMenu?: EventHandlerUnion<T, PointerEvent> | undefined;
onCopy?: EventHandlerUnion<T, ClipboardEvent> | undefined;
onCueChange?: EventHandlerUnion<T, Event> | undefined;
onCut?: EventHandlerUnion<T, ClipboardEvent> | undefined;
onDblClick?: EventHandlerUnion<T, MouseEvent> | undefined;
onDrag?: EventHandlerUnion<T, DragEvent> | undefined;
onDragEnd?: EventHandlerUnion<T, DragEvent> | undefined;
onDragEnter?: EventHandlerUnion<T, DragEvent> | undefined;
onDragExit?: EventHandlerUnion<T, DragEvent> | undefined;
onDragLeave?: EventHandlerUnion<T, DragEvent> | undefined;
onDragOver?: EventHandlerUnion<T, DragEvent> | undefined;
onDragStart?: EventHandlerUnion<T, DragEvent> | undefined;
onDrop?: EventHandlerUnion<T, DragEvent> | undefined;
onDurationChange?: EventHandlerUnion<T, Event> | undefined;
onEmptied?: EventHandlerUnion<T, Event> | undefined;
onEnded?: EventHandlerUnion<T, Event> | undefined;
onError?: EventHandlerUnion<T, ErrorEvent> | undefined;
onFocus?: FocusEventHandlerUnion<T, FocusEvent> | undefined;
onFocusIn?: FocusEventHandlerUnion<T, FocusEvent> | undefined;
onFocusOut?: FocusEventHandlerUnion<T, FocusEvent> | undefined;
onGotPointerCapture?: EventHandlerUnion<T, PointerEvent> | undefined;
onInput?: InputEventHandlerUnion<T, InputEvent> | undefined;
onInvalid?: EventHandlerUnion<T, Event> | undefined;
onKeyDown?: EventHandlerUnion<T, KeyboardEvent> | undefined;
onKeyPress?: EventHandlerUnion<T, KeyboardEvent> | undefined;
onKeyUp?: EventHandlerUnion<T, KeyboardEvent> | undefined;
onLoad?: EventHandlerUnion<T, Event> | undefined;
onLoadedData?: EventHandlerUnion<T, Event> | undefined;
onLoadedMetadata?: EventHandlerUnion<T, Event> | undefined;
onLoadStart?: EventHandlerUnion<T, Event> | undefined;
onLostPointerCapture?: EventHandlerUnion<T, PointerEvent> | undefined;
onMouseDown?: EventHandlerUnion<T, MouseEvent> | undefined;
onMouseEnter?: EventHandlerUnion<T, MouseEvent> | undefined;
onMouseLeave?: EventHandlerUnion<T, MouseEvent> | undefined;
onMouseMove?: EventHandlerUnion<T, MouseEvent> | undefined;
onMouseOut?: EventHandlerUnion<T, MouseEvent> | undefined;
onMouseOver?: EventHandlerUnion<T, MouseEvent> | undefined;
onMouseUp?: EventHandlerUnion<T, MouseEvent> | undefined;
onPaste?: EventHandlerUnion<T, ClipboardEvent> | undefined;
onPause?: EventHandlerUnion<T, Event> | undefined;
onPlay?: EventHandlerUnion<T, Event> | undefined;
onPlaying?: EventHandlerUnion<T, Event> | undefined;
onPointerCancel?: EventHandlerUnion<T, PointerEvent> | undefined;
onPointerDown?: EventHandlerUnion<T, PointerEvent> | undefined;
onPointerEnter?: EventHandlerUnion<T, PointerEvent> | undefined;
onPointerLeave?: EventHandlerUnion<T, PointerEvent> | undefined;
onPointerMove?: EventHandlerUnion<T, PointerEvent> | undefined;
onPointerOut?: EventHandlerUnion<T, PointerEvent> | undefined;
onPointerOver?: EventHandlerUnion<T, PointerEvent> | undefined;
onPointerUp?: EventHandlerUnion<T, PointerEvent> | undefined;
onProgress?: EventHandlerUnion<T, ProgressEvent> | undefined;
onRateChange?: EventHandlerUnion<T, Event> | undefined;
onReset?: EventHandlerUnion<T, Event> | undefined;
onResize?: EventHandlerUnion<T, UIEvent> | undefined;
onScroll?: EventHandlerUnion<T, Event> | undefined;
onScrollEnd?: EventHandlerUnion<T, Event> | undefined;
onSecurityPolicyViolation?: EventHandlerUnion<T, SecurityPolicyViolationEvent> | undefined;
onSeeked?: EventHandlerUnion<T, Event> | undefined;
onSeeking?: EventHandlerUnion<T, Event> | undefined;
onSelect?: EventHandlerUnion<T, Event> | undefined;
onSelectionChange?: EventHandlerUnion<T, Event> | undefined;
onSlotChange?: EventHandlerUnion<T, Event> | undefined;
onStalled?: EventHandlerUnion<T, Event> | undefined;
onSubmit?: EventHandlerUnion<T, SubmitEvent> | undefined;
onSuspend?: EventHandlerUnion<T, Event> | undefined;
onTimeUpdate?: EventHandlerUnion<T, Event> | undefined;
onToggle?: EventHandlerUnion<T, ToggleEvent> | undefined;
onTouchCancel?: EventHandlerUnion<T, TouchEvent> | undefined;
onTouchEnd?: EventHandlerUnion<T, TouchEvent> | undefined;
onTouchMove?: EventHandlerUnion<T, TouchEvent> | undefined;
onTouchStart?: EventHandlerUnion<T, TouchEvent> | undefined;
onTransitionCancel?: EventHandlerUnion<T, TransitionEvent> | undefined;
onTransitionEnd?: EventHandlerUnion<T, TransitionEvent> | undefined;
onTransitionRun?: EventHandlerUnion<T, TransitionEvent> | undefined;
onTransitionStart?: EventHandlerUnion<T, TransitionEvent> | undefined;
onVolumeChange?: EventHandlerUnion<T, Event> | undefined;
onWaiting?: EventHandlerUnion<T, Event> | undefined;
onWheel?: EventHandlerUnion<T, WheelEvent> | undefined;
}
/** @type {GlobalEventHandlers} */
interface CustomEventHandlersLowerCase<T> {
onabort?: EventHandlerUnion<T, UIEvent> | undefined;
onanimationcancel?: EventHandlerUnion<T, AnimationEvent> | undefined;
onanimationend?: EventHandlerUnion<T, AnimationEvent> | undefined;
onanimationiteration?: EventHandlerUnion<T, AnimationEvent> | undefined;
onanimationstart?: EventHandlerUnion<T, AnimationEvent> | undefined;
onauxclick?: EventHandlerUnion<T, PointerEvent> | undefined;
onbeforeinput?: InputEventHandlerUnion<T, InputEvent> | undefined;
onbeforetoggle?: EventHandlerUnion<T, ToggleEvent> | undefined;
onblur?: FocusEventHandlerUnion<T, FocusEvent> | undefined;
oncancel?: EventHandlerUnion<T, Event> | undefined;
oncanplay?: EventHandlerUnion<T, Event> | undefined;
oncanplaythrough?: EventHandlerUnion<T, Event> | undefined;
onchange?: ChangeEventHandlerUnion<T, Event> | undefined;
onclick?: EventHandlerUnion<T, MouseEvent> | undefined;
// TODO `CommandEvent` is currently undefined in TS
oncommand?: EventHandlerUnion<T, Event> | undefined;
oncompositionend?: EventHandlerUnion<T, CompositionEvent> | undefined;
oncompositionstart?: EventHandlerUnion<T, CompositionEvent> | undefined;
oncompositionupdate?: EventHandlerUnion<T, CompositionEvent> | undefined;
oncontextmenu?: EventHandlerUnion<T, PointerEvent> | undefined;
oncopy?: EventHandlerUnion<T, ClipboardEvent> | undefined;
oncuechange?: EventHandlerUnion<T, Event> | undefined;
oncut?: EventHandlerUnion<T, ClipboardEvent> | undefined;
ondblclick?: EventHandlerUnion<T, MouseEvent> | undefined;
ondrag?: EventHandlerUnion<T, DragEvent> | undefined;
ondragend?: EventHandlerUnion<T, DragEvent> | undefined;
ondragenter?: EventHandlerUnion<T, DragEvent> | undefined;
ondragexit?: EventHandlerUnion<T, DragEvent> | undefined;
ondragleave?: EventHandlerUnion<T, DragEvent> | undefined;
ondragover?: EventHandlerUnion<T, DragEvent> | undefined;
ondragstart?: EventHandlerUnion<T, DragEvent> | undefined;
ondrop?: EventHandlerUnion<T, DragEvent> | undefined;
ondurationchange?: EventHandlerUnion<T, Event> | undefined;
onemptied?: EventHandlerUnion<T, Event> | undefined;
onended?: EventHandlerUnion<T, Event> | undefined;
onerror?: EventHandlerUnion<T, ErrorEvent> | undefined;
onfocus?: FocusEventHandlerUnion<T, FocusEvent> | undefined;
onfocusin?: FocusEventHandlerUnion<T, FocusEvent> | undefined;
onfocusout?: FocusEventHandlerUnion<T, FocusEvent> | undefined;
ongotpointercapture?: EventHandlerUnion<T, PointerEvent> | undefined;
oninput?: InputEventHandlerUnion<T, InputEvent> | undefined;
oninvalid?: EventHandlerUnion<T, Event> | undefined;
onkeydown?: EventHandlerUnion<T, KeyboardEvent> | undefined;
onkeypress?: EventHandlerUnion<T, KeyboardEvent> | undefined;
onkeyup?: EventHandlerUnion<T, KeyboardEvent> | undefined;
onload?: EventHandlerUnion<T, Event> | undefined;
onloadeddata?: EventHandlerUnion<T, Event> | undefined;
onloadedmetadata?: EventHandlerUnion<T, Event> | undefined;
onloadstart?: EventHandlerUnion<T, Event> | undefined;
onlostpointercapture?: EventHandlerUnion<T, PointerEvent> | undefined;
onmousedown?: EventHandlerUnion<T, MouseEvent> | undefined;
onmouseenter?: EventHandlerUnion<T, MouseEvent> | undefined;
onmouseleave?: EventHandlerUnion<T, MouseEvent> | undefined;
onmousemove?: EventHandlerUnion<T, MouseEvent> | undefined;
onmouseout?: EventHandlerUnion<T, MouseEvent> | undefined;
onmouseover?: EventHandlerUnion<T, MouseEvent> | undefined;
onmouseup?: EventHandlerUnion<T, MouseEvent> | undefined;
onpaste?: EventHandlerUnion<T, ClipboardEvent> | undefined;
onpause?: EventHandlerUnion<T, Event> | undefined;
onplay?: EventHandlerUnion<T, Event> | undefined;
onplaying?: EventHandlerUnion<T, Event> | undefined;
onpointercancel?: EventHandlerUnion<T, PointerEvent> | undefined;
onpointerdown?: EventHandlerUnion<T, PointerEvent> | undefined;
onpointerenter?: EventHandlerUnion<T, PointerEvent> | undefined;
onpointerleave?: EventHandlerUnion<T, PointerEvent> | undefined;
onpointermove?: EventHandlerUnion<T, PointerEvent> | undefined;
onpointerout?: EventHandlerUnion<T, PointerEvent> | undefined;
onpointerover?: EventHandlerUnion<T, PointerEvent> | undefined;
onpointerup?: EventHandlerUnion<T, PointerEvent> | undefined;
onprogress?: EventHandlerUnion<T, ProgressEvent> | undefined;
onratechange?: EventHandlerUnion<T, Event> | undefined;
onreset?: EventHandlerUnion<T, Event> | undefined;
onresize?: EventHandlerUnion<T, UIEvent> | undefined;
onscroll?: EventHandlerUnion<T, Event> | undefined;
onscrollend?: EventHandlerUnion<T, Event> | undefined;
onsecuritypolicyviolation?: EventHandlerUnion<T, SecurityPolicyViolationEvent> | undefined;
onseeked?: EventHandlerUnion<T, Event> | undefined;
onseeking?: EventHandlerUnion<T, Event> | undefined;
onselect?: EventHandlerUnion<T, Event> | undefined;
onselectionchange?: EventHandlerUnion<T, Event> | undefined;
onslotchange?: EventHandlerUnion<T, Event> | undefined;
onstalled?: EventHandlerUnion<T, Event> | undefined;
onsubmit?: EventHandlerUnion<T, SubmitEvent> | undefined;
onsuspend?: EventHandlerUnion<T, Event> | undefined;
ontimeupdate?: EventHandlerUnion<T, Event> | undefined;
ontoggle?: EventHandlerUnion<T, ToggleEvent> | undefined;
ontouchcancel?: EventHandlerUnion<T, TouchEvent> | undefined;
ontouchend?: EventHandlerUnion<T, TouchEvent> | undefined;
ontouchmove?: EventHandlerUnion<T, TouchEvent> | undefined;
ontouchstart?: EventHandlerUnion<T, TouchEvent> | undefined;
ontransitioncancel?: EventHandlerUnion<T, TransitionEvent> | undefined;
ontransitionend?: EventHandlerUnion<T, TransitionEvent> | undefined;
ontransitionrun?: EventHandlerUnion<T, TransitionEvent> | undefined;
ontransitionstart?: EventHandlerUnion<T, TransitionEvent> | undefined;
onvolumechange?: EventHandlerUnion<T, Event> | undefined;
onwaiting?: EventHandlerUnion<T, Event> | undefined;
onwheel?: EventHandlerUnion<T, WheelEvent> | undefined;
}
interface CustomEventHandlersNamespaced<T> {
"on:abort"?: EventHandlerWithOptionsUnion<T, UIEvent> | undefined;
"on:animationcancel"?: EventHandlerWithOptionsUnion<T, AnimationEvent> | undefined;
"on:animationend"?: EventHandlerWithOptionsUnion<T, AnimationEvent> | undefined;
"on:animationiteration"?: EventHandlerWithOptionsUnion<T, AnimationEvent> | undefined;
"on:animationstart"?: EventHandlerWithOptionsUnion<T, AnimationEvent> | undefined;
"on:auxclick"?: EventHandlerWithOptionsUnion<T, PointerEvent> | undefined;
"on:beforeinput"?:
| EventHandlerWithOptionsUnion<T, InputEvent, InputEventHandler<T, InputEvent>>
| undefined;
"on:beforetoggle"?: EventHandlerWithOptionsUnion<T, ToggleEvent> | undefined;
"on:blur"?:
| EventHandlerWithOptionsUnion<T, FocusEvent, FocusEventHandler<T, FocusEvent>>
| undefined;
"on:cancel"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
"on:canplay"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
"on:canplaythrough"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
"on:change"?: EventHandlerWithOptionsUnion<T, Event, ChangeEventHandler<T, Event>> | undefined;
"on:click"?: EventHandlerWithOptionsUnion<T, MouseEvent> | undefined;
// TODO `CommandEvent` is currently undefined in TS
"on:command"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
"on:compositionend"?: EventHandlerWithOptionsUnion<T, CompositionEvent> | undefined;
"on:compositionstart"?: EventHandlerWithOptionsUnion<T, CompositionEvent> | undefined;
"on:compositionupdate"?: EventHandlerWithOptionsUnion<T, CompositionEvent> | undefined;
"on:contextmenu"?: EventHandlerWithOptionsUnion<T, PointerEvent> | undefined;
"on:copy"?: EventHandlerWithOptionsUnion<T, ClipboardEvent> | undefined;
"on:cuechange"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
"on:cut"?: EventHandlerWithOptionsUnion<T, ClipboardEvent> | undefined;
"on:dblclick"?: EventHandlerWithOptionsUnion<T, MouseEvent> | undefined;
"on:drag"?: EventHandlerWithOptionsUnion<T, DragEvent> | undefined;
"on:dragend"?: EventHandlerWithOptionsUnion<T, DragEvent> | undefined;
"on:dragenter"?: EventHandlerWithOptionsUnion<T, DragEvent> | undefined;
"on:dragexit"?: EventHandlerWithOptionsUnion<T, DragEvent> | undefined;
"on:dragleave"?: EventHandlerWithOptionsUnion<T, DragEvent> | undefined;
"on:dragover"?: EventHandlerWithOptionsUnion<T, DragEvent> | undefined;
"on:dragstart"?: EventHandlerWithOptionsUnion<T, DragEvent> | undefined;
"on:drop"?: EventHandlerWithOptionsUnion<T, DragEvent> | undefined;
"on:durationchange"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
"on:emptied"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
"on:ended"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
"on:error"?: EventHandlerWithOptionsUnion<T, ErrorEvent> | undefined;
"on:focus"?:
| EventHandlerWithOptionsUnion<T, FocusEvent, FocusEventHandler<T, FocusEvent>>
| undefined;
"on:focusin"?:
| EventHandlerWithOptionsUnion<T, FocusEvent, FocusEventHandler<T, FocusEvent>>
| undefined;
"on:focusout"?:
| EventHandlerWithOptionsUnion<T, FocusEvent, FocusEventHandler<T, FocusEvent>>
| undefined;
"on:gotpointercapture"?: EventHandlerWithOptionsUnion<T, PointerEvent> | undefined;
"on:input"?:
| EventHandlerWithOptionsUnion<T, InputEvent, InputEventHandler<T, InputEvent>>
| undefined;
"on:invalid"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
"on:keydown"?: EventHandlerWithOptionsUnion<T, KeyboardEvent> | undefined;
"on:keypress"?: EventHandlerWithOptionsUnion<T, KeyboardEvent> | undefined;
"on:keyup"?: EventHandlerWithOptionsUnion<T, KeyboardEvent> | undefined;
"on:load"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
"on:loadeddata"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
"on:loadedmetadata"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
"on:loadstart"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
"on:lostpointercapture"?: EventHandlerWithOptionsUnion<T, PointerEvent> | undefined;
"on:mousedown"?: EventHandlerWithOptionsUnion<T, MouseEvent> | undefined;
"on:mouseenter"?: EventHandlerWithOptionsUnion<T, MouseEvent> | undefined;
"on:mouseleave"?: EventHandlerWithOptionsUnion<T, MouseEvent> | undefined;
"on:mousemove"?: EventHandlerWithOptionsUnion<T, MouseEvent> | undefined;
"on:mouseout"?: EventHandlerWithOptionsUnion<T, MouseEvent> | undefined;
"on:mouseover"?: EventHandlerWithOptionsUnion<T, MouseEvent> | undefined;
"on:mouseup"?: EventHandlerWithOptionsUnion<T, MouseEvent> | undefined;
"on:paste"?: EventHandlerWithOptionsUnion<T, ClipboardEvent> | undefined;
"on:pause"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
"on:play"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
"on:playing"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
"on:pointercancel"?: EventHandlerWithOptionsUnion<T, PointerEvent> | undefined;
"on:pointerdown"?: EventHandlerWithOptionsUnion<T, PointerEvent> | undefined;
"on:pointerenter"?: EventHandlerWithOptionsUnion<T, PointerEvent> | undefined;
"on:pointerleave"?: EventHandlerWithOptionsUnion<T, PointerEvent> | undefined;
"on:pointermove"?: EventHandlerWithOptionsUnion<T, PointerEvent> | undefined;
"on:pointerout"?: EventHandlerWithOptionsUnion<T, PointerEvent> | undefined;
"on:pointerover"?: EventHandlerWithOptionsUnion<T, PointerEvent> | undefined;
"on:pointerup"?: EventHandlerWithOptionsUnion<T, PointerEvent> | undefined;
"on:progress"?: EventHandlerWithOptionsUnion<T, ProgressEvent> | undefined;
"on:ratechange"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
"on:reset"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
"on:resize"?: EventHandlerWithOptionsUnion<T, UIEvent> | undefined;
"on:scroll"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
"on:scrollend"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
"on:securitypolicyviolation"?:
| EventHandlerWithOptionsUnion<T, SecurityPolicyViolationEvent>
| undefined;
"on:seeked"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
"on:seeking"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
"on:select"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
"on:selectionchange"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
"on:slotchange"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
"on:stalled"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
"on:submit"?: EventHandlerWithOptionsUnion<T, SubmitEvent> | undefined;
"on:suspend"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
"on:timeupdate"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
"on:toggle"?: EventHandlerWithOptionsUnion<T, ToggleEvent> | undefined;
"on:touchcancel"?: EventHandlerWithOptionsUnion<T, TouchEvent> | undefined;
"on:touchend"?: EventHandlerWithOptionsUnion<T, TouchEvent> | undefined;
"on:touchmove"?: EventHandlerWithOptionsUnion<T, TouchEvent> | undefined;
"on:touchstart"?: EventHandlerWithOptionsUnion<T, TouchEvent> | undefined;
"on:transitioncancel"?: EventHandlerWithOptionsUnion<T, TransitionEvent> | undefined;
"on:transitionend"?: EventHandlerWithOptionsUnion<T, TransitionEvent> | undefined;
"on:transitionrun"?: EventHandlerWithOptionsUnion<T, TransitionEvent> | undefined;
"on:transitionstart"?: EventHandlerWithOptionsUnion<T, TransitionEvent> | undefined;
"on:volumechange"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
"on:waiting"?: EventHandlerWithOptionsUnion<T, Event> | undefined;
"on:wheel"?: EventHandlerWithOptionsUnion<T, WheelEvent> | undefined;
}
interface DOMAttributes<T>
extends CustomAttributes<T>,
DirectiveAttributes,
DirectiveFunctionAttributes<T>,
PropAttributes,
AttrAttributes,
BoolAttributes,
OnAttributes<T>,
OnCaptureAttributes<T>,
CustomEventHandlersCamelCase<T>,
CustomEventHandlersLowerCase<T>,
CustomEventHandlersNamespaced<T> {
children?: Element | undefined;
innerHTML?: string;
innerText?: string | number;
textContent?: string | number;
}
interface CSSProperties extends csstype.PropertiesHyphen {
// Override
[key: `-${string}`]: string | number | undefined;
}
type HTMLAutocapitalize = "off" | "none" | "on" | "sentences" | "words" | "characters";
type HTMLDir = "ltr" | "rtl" | "auto";
type HTMLFormEncType = "application/x-www-form-urlencoded" | "multipart/form-data" | "text/plain";
type HTMLFormMethod = "post" | "get" | "dialog";
type HTMLCrossorigin = "anonymous" | "use-credentials" | "";
type HTMLReferrerPolicy =
| "no-referrer"
| "no-referrer-when-downgrade"
| "origin"
| "origin-when-cross-origin"
| "same-origin"
| "strict-origin"
| "strict-origin-when-cross-origin"
| "unsafe-url";
type HTMLIframeSandbox =
| "allow-downloads-without-user-activation"
| "allow-downloads"
| "allow-forms"
| "allow-modals"
| "allow-orientation-lock"
| "allow-pointer-lock"
| "allow-popups"
| "allow-popups-to-escape-sandbox"
| "allow-presentation"
| "allow-same-origin"
| "allow-scripts"
| "allow-storage-access-by-user-activation"
| "allow-top-navigation"
| "allow-top-navigation-by-user-activation"
| "allow-top-navigation-to-custom-protocols";
type HTMLLinkAs =
| "audio"
| "document"
| "embed"
| "fetch"
| "font"
| "image"
| "object"
| "script"
| "style"
| "track"
| "video"
| "worker";
// All the WAI-ARIA 1.1 attributes from https://www.w3.org/TR/wai-aria-1.1/
interface AriaAttributes {
/**
* Identifies the currently active element when DOM focus is on a composite widget, textbox,
* group, or application.
*/
"aria-activedescendant"?: string | undefined;
/**
* Indicates whether assistive technologies will present all, or only parts of, the changed
* region based on the change notifications defined by the aria-relevant attribute.
*/
"aria-atomic"?: boolean | "false" | "true" | undefined;
/**
* Similar to the global aria-label. Defines a string value that labels the current element,
* which is intended to be converted into Braille.
*
* @see aria-label.
*/
"aria-braillelabel"?: string | undefined;
/**
* Defines a human-readable, author-localized abbreviated description for the role of an element
* intended to be converted into Braille. Braille is not a one-to-one transliteration of letters
* and numbers, but rather it includes various abbreviations, contractions, and characters that
* represent words (known as logograms).
*
* Instead of converting long role descriptions to Braille, the aria-brailleroledescription
* attribute allows for providing an abbreviated version of the aria-roledescription value,
* which is a human-readable, author-localized description for the role of an element, for
* improved user experience with braille interfaces.
*
* @see aria-roledescription.
*/
"aria-brailleroledescription"?: string | undefined;
/**
* Indicates whether inputting text could trigger display of one or more predictions of the
* user's intended value for an input and specifies how predictions would be presented if they
* are made.
*/
"aria-autocomplete"?: "none" | "inline" | "list" | "both" | undefined;
/**
* Indicates an element is being modified and that assistive technologies MAY want to wait until
* the modifications are complete before exposing them to the user.
*/
"aria-busy"?: boolean | "false" | "true" | undefined;
/**
* Indicates the current "checked" state of checkboxes, radio buttons, and other widgets.
*
* @see aria-pressed @see aria-selected.
*/
"aria-checked"?: boolean | "false" | "mixed" | "true" | undefined;
/**
* Defines the total number of columns in a table, grid, or treegrid.
*
* @see aria-colindex.
*/
"aria-colcount"?: number | string | undefined;
/**
* Defines an element's column index or position with respect to the total number of columns
* within a table, grid, or treegrid.
*
* @see aria-colcount @see aria-colspan.
*/
"aria-colindex"?: number | string | undefined;
/** Defines a human-readable text alternative of the numeric aria-colindex. */
"aria-colindextext"?: number | string | undefined;
/**
* Defines the number of columns spanned by a cell or gridcell within a table, grid, or
* treegrid.
*
* @see aria-colindex @see aria-rowspan.
*/
"aria-colspan"?: number | string | undefined;
/**
* Identifies the element (or elements) whose contents or presence are controlled by the current
* element.
*
* @see aria-owns.
*/
"aria-controls"?: string | undefined;
/**
* Indicates the element that represents the current item within a container or set of related
* elements.
*/
"aria-current"?:
| boolean
| "false"
| "true"
| "page"
| "step"
| "location"
| "date"
| "time"
| undefined;
/**
* Identifies the element (or elements) that describes the object.
*
* @see aria-labelledby
*/
"aria-describedby"?: string | undefined;
/**
* Defines a string value that describes or annotates the current element.
*
* @see aria-describedby
*/
"aria-description"?: string | undefined;
/**
* Identifies the element that provides a detailed, extended description for the object.
*
* @see aria-describedby.
*/
"aria-details"?: string | undefined;
/**
* Indicates that the element is perceivable but disabled, so it is not editable or otherwise
* operable.
*
* @see aria-hidden @see aria-readonly.
*/
"aria-disabled"?: boolean | "false" | "true" | undefined;
/**
* Indicates what functions can be performed when a dragged object is released on the drop
* target.
*
* @deprecated In ARIA 1.1
*/
"aria-dropeffect"?: "none" | "copy" | "execute" | "link" | "move" | "popup" | undefined;
/**
* Identifies the element that provides an error message for the object.
*
* @see aria-invalid @see aria-describedby.
*/
"aria-errormessage"?: string | undefined;
/**
* Indicates whether the element, or another grouping element it controls, is currently expanded
* or collapsed.
*/
"aria-expanded"?: boolean | "false" | "true" | undefined;
/**
* Identifies the next element (or elements) in an alternate reading order of content which, at
* the user's discretion, allows assistive technology to override the general default of reading
* in document source order.
*/
"aria-flowto"?: string | undefined;
/**
* Indicates an element's "grabbed" state in a drag-and-drop operation.
*
* @deprecated In ARIA 1.1
*/
"aria-grabbed"?: boolean | "false" | "true" | undefined;
/**
* Indicates the availability and type of interactive popup element, such as menu or dialog,
* that can be triggered by an element.
*/
"aria-haspopup"?:
| boolean
| "false"
| "true"
| "menu"
| "listbox"
| "tree"
| "grid"
| "dialog"
| undefined;
/**
* Indicates whether the element is exposed to an accessibility API.
*
* @see aria-disabled.
*/
"aria-hidden"?: boolean | "false" | "true" | undefined;
/**
* Indicates the entered value does not conform to the format expected by the application.
*
* @see aria-errormessage.
*/
"aria-invalid"?: boolean | "false" | "true" | "grammar" | "spelling" | undefined;
/**
* Indicates keyboard shortcuts that an author has implemented to activate or give focus to an
* element.
*/
"aria-keyshortcuts"?: string | undefined;
/**
* Defines a string value that labels the current element.
*
* @see aria-labelledby.
*/
"aria-label"?: string | undefined;
/**
* Identifies the element (or elements) that labels the current element.
*
* @see aria-describedby.
*/
"aria-labelledby"?: string | undefined;
/** Defines the hierarchical level of an element within a structure. */
"aria-level"?: number | string | undefined;
/**
* Indicates that an element will be updated, and describes the types of updates the user
* agents, assistive technologies, and user can expect from the live region.
*/
"aria-live"?: "off" | "assertive" | "polite" | undefined;
/** Indicates whether an element is modal when displayed. */
"aria-modal"?: boolean | "false" | "true" | undefined;
/** Indicates whether a text box accepts multiple lines of input or only a single line. */
"aria-multiline"?: boolean | "false" | "true" | undefined;
/**
* Indicates that the user may select more than one item from the current selectable
* descendants.
*/
"aria-multiselectable"?: boolean | "false" | "true" | undefined;
/** Indicates whether the element's orientation is horizontal, vertical, or unknown/ambiguous. */
"aria-orientation"?: "horizontal" | "vertical" | undefined;
/**
* Identifies an element (or elements) in order to define a visual, functional, or contextual
* parent/child relationship between DOM elements where the DOM hierarchy cannot be used to
* represent the relationship.
*
* @see aria-controls.
*/
"aria-owns"?: string | undefined;
/**
* Defines a short hint (a word or short phrase) intended to aid the user with data entry when
* the control has no value. A hint could be a sample value or a brief description of the
* expected format.
*/
"aria-placeholder"?: string | undefined;
/**
* Defines an element's number or position in the current set of listitems or treeitems. Not
* required if all elements in the set are present in the DOM.
*
* @see aria-setsize.
*/
"aria-posinset"?: number | string | undefined;
/**
* Indicates the current "pressed" state of toggle buttons.
*
* @see aria-checked @see aria-selected.
*/
"aria-pressed"?: boolean | "false" | "mixed" | "true" | undefined;
/**
* Indicates that the element is not editable, but is otherwise operable.
*
* @see aria-disabled.
*/
"aria-readonly"?: boolean | "false" | "true" | undefined;
/**
* Indicates what notifications the user agent will trigger when the accessibility tree within a
* live region is modified.
*
* @see aria-atomic.
*/
"aria-relevant"?:
| "additions"
| "additions removals"
| "additions text"
| "all"
| "removals"
| "removals additions"
| "removals text"
| "text"
| "text additions"
| "text removals"
| undefined;
/** Indicates that user input is required on the element before a form may be submitted. */
"aria-required"?: boolean | "false" | "true" | undefined;
/** Defines a human-readable, author-localized description for the role of an element. */
"aria-roledescription"?: string | undefined;
/**
* Defines the total number of rows in a table, grid, or treegrid.
*
* @see aria-rowindex.
*/
"aria-rowcount"?: number | string | undefined;
/**
* Defines an element's row index or position with respect to the total number of rows within a
* table, grid, or treegrid.
*
* @see aria-rowcount @see aria-rowspan.
*/
"aria-rowindex"?: number | string | undefined;
/** Defines a human-readable text alternative of aria-rowindex. */
"aria-rowindextext"?: number | string | undefined;
/**
* Defines the number of rows spanned by a cell or gridcell within a table, grid, or treegrid.
*
* @see aria-rowindex @see aria-colspan.
*/
"aria-rowspan"?: number | string | undefined;
/**
* Indicates the current "selected" state of various widgets.
*
* @see aria-checked @see aria-pressed.
*/
"aria-selected"?: boolean | "false" | "true" | undefined;
/**
* Defines the number of items in the current set of listitems or treeitems. Not required if all
* elements in the set are present in the DOM.
*
* @see aria-posinset.
*/
"aria-setsize"?: number | string | undefined;
/** Indicates if items in a table or grid are sorted in ascending or descending order. */
"aria-sort"?: "none" | "ascending" | "descending" | "other" | undefined;
/** Defines the maximum allowed value for a range widget. */
"aria-valuemax"?: number | string | undefined;
/** Defines the minimum allowed value for a range widget. */
"aria-valuemin"?: number | string | undefined;
/**
* Defines the current value for a range widget.
*
* @see aria-valuetext.
*/
"aria-valuenow"?: number | string | undefined;
/** Defines the human readable text alternative of aria-valuenow for a range widget. */
"aria-valuetext"?: string | undefined;
role?:
| "alert"
| "alertdialog"
| "application"
| "article"
| "banner"
| "button"
| "cell"
| "checkbox"
| "columnheader"
| "combobox"
| "complementary"
| "contentinfo"
| "definition"
| "dialog"
| "directory"
| "document"
| "feed"
| "figure"
| "form"
| "grid"
| "gridcell"
| "group"
| "heading"
| "img"
| "link"
| "list"
| "listbox"
| "listitem"
| "log"
| "main"
| "marquee"
| "math"
| "menu"
| "menubar"
| "menuitem"
| "menuitemcheckbox"
| "menuitemradio"
| "meter"
| "navigation"
| "none"
| "note"
| "option"
| "presentation"
| "progressbar"
| "radio"
| "radiogroup"
| "region"
| "row"
| "rowgroup"
| "rowheader"
| "scrollbar"
| "search"
| "searchbox"
| "separator"
| "slider"
| "spinbutton"
| "status"
| "switch"
| "tab"
| "table"
| "tablist"
| "tabpanel"
| "term"
| "textbox"
| "timer"
| "toolbar"
| "tooltip"
| "tree"
| "treegrid"
| "treeitem"
| undefined;
}
// TODO: Should we allow this?
// type ClassKeys = `class:${string}`;
// type CSSKeys = Exclude<keyof csstype.PropertiesHyphen, `-${string}`>;
// type CSSAttributes = {
// [key in CSSKeys as `style:${key}`]: csstype.PropertiesHyphen[key];
// };
interface HTMLAttributes<T> extends AriaAttributes, DOMAttributes<T> {
// [key: ClassKeys]: boolean;
about?: string | undefined;
accesskey?: string | undefined;
autocapitalize?: HTMLAutocapitalize | undefined;
class?: string | undefined;
color?: string | undefined;
contenteditable?: "true" | "false" | boolean | "plaintext-only" | "inherit" | undefined;
contextmenu?: string | undefined;
datatype?: string | undefined;
dir?: HTMLDir | undefined;
draggable?: boolean | "false" | "true" | undefined;
exportparts?: string | undefined;
hidden?: boolean | "hidden" | "until-found" | undefined;
id?: string | undefined;
inert?: boolean | undefined;
inlist?: any | undefined;
inputmode?:
| "decimal"
| "email"
| "none"
| "numeric"
| "search"
| "tel"
| "text"
| "url"
| undefined;
is?: string | undefined;
itemid?: string | undefined;
itemprop?: string | undefined;
itemref?: string | undefined;
itemscope?: boolean | undefined;
itemtype?: string | undefined;
lang?: string | undefined;
part?: string | undefined;
popover?: boolean | "manual" | "auto" | undefined;
prefix?: string | undefined;
property?: string | undefined;
resource?: string | undefined;
slot?: string | undefined;
spellcheck?: "true" | "false" | boolean | undefined;
style?: CSSProperties | string | undefined;
tabindex?: number | string | undefined;
title?: string | undefined;
translate?: "yes" | "no" | undefined;
typeof?: string | undefined;
vocab?: string | undefined;
accessKey?: string | undefined;
autoCapitalize?: HTMLAutocapitalize | undefined;
contentEditable?: boolean | "plaintext-only" | "inherit" | undefined;
contextMenu?: string | undefined;
exportParts?: string | undefined;
inputMode?:
| "none"
| "text"
| "tel"
| "url"
| "email"
| "numeric"
| "decimal"
| "search"
| undefined;
itemId?: string | undefined;
itemProp?: string | undefined;
itemRef?: string | undefined;
itemScope?: boolean | undefined;
itemType?: string | undefined;
tabIndex?: number | string | undefined;
}
interface AnchorHTMLAttributes<T> extends HTMLAttributes<T> {
download?: string | undefined;
href?: string | undefined;
hreflang?: string | undefined;
ping?: string | undefined;
referrerpolicy?: HTMLReferrerPolicy | undefined;
rel?: string | undefined;
target?: "_self" | "_blank" | "_parent" | "_top" | (string & {}) | undefined;
type?: string | undefined;
/** @experimental */
attributionsrc?: string | undefined;
referrerPolicy?: HTMLReferrerPolicy | undefined;
/** @deprecated */
charset?: string | undefined;
/** @deprecated */
coords?: string | undefined;
/** @deprecated */
name?: string | undefined;
/** @deprecated */
rev?: string | undefined;
/** @deprecated */
shape?: "rect" | "circle" | "poly" | "default" | undefined;
}
interface AudioHTMLAttributes<T> extends MediaHTMLAttributes<T> {}
interface AreaHTMLAttributes<T> extends HTMLAttributes<T> {
alt?: string | undefined;
coords?: string | undefined;
download?: string | undefined;
href?: string | undefined;
ping?: string | undefined;
referrerpolicy?: HTMLReferrerPolicy | undefined;
rel?: string | undefined;
shape?: "rect" | "circle" | "poly" | "default" | undefi