// TypeScript Version: 3.0 import * as CSS from 'csstype'; export = vidom; export as namespace vidom; type MapLike = Record; type DOMElement = Element; declare namespace vidom { type Key = string | number; type Ref = (ref: T | null) => void; interface FunctionComponent< TAttrs extends MapLike = {}, TChildren = unknown, TContext extends MapLike = {} > { (attrs: TAttrs, children: TChildren, context: TContext): Element | null; defaultAttrs?: Partial; } interface ComponentClass< TAttrs extends MapLike = {}, TChildren = unknown, TContext extends MapLike = {} > { new (attrs: TAttrs, children: TChildren, context: TContext): Component; defaultAttrs?: Partial; } type ComponentType< TAttrs extends MapLike = {}, TChildren = unknown, TContext extends MapLike = {} > = ComponentClass | FunctionComponent; abstract class Component< TAttrs extends MapLike = {}, TChildren = unknown, TState extends MapLike = {}, TContext extends MapLike = {}, TChildContext extends MapLike = {} > { protected readonly attrs: Readonly; protected readonly children: TChildren; protected readonly state: Readonly; protected readonly context: Readonly; constructor(attrs: TAttrs, children: TChildren, context: TContext); protected setState(state: Partial): void; protected update(): void; protected isMounted(): boolean; protected getDomNode(): DOMElement | DOMElement[]; protected onInit(): void; protected onMount(): void; protected onChange( prevAttrs: TAttrs, prevChildren: TChildren, prevState: TState, prevContext: TContext ): void; protected onChildContextRequest(): TChildContext; protected shouldRerender( prevAttrs: TAttrs, prevChildren: TChildren, prevState: TState, prevContext: TContext ): boolean; protected abstract onRender(): Node; protected onUpdate( prevAttrs: TAttrs, prevChildren: TChildren, prevState: TState, prevContext: TContext ): void; protected onUnmount(): void; } abstract class BaseElement { readonly key: Key | null; clone(): BaseElement; } class TagElement extends BaseElement { readonly tag: string; readonly attrs: HTMLAttributes | SVGAttributes; readonly children: Element[] | string | null; readonly ref: Ref | null; constructor( tag: string, key?: Key | null, attrs?: HTMLAttributes | SVGAttributes | null, children?: Node, ref?: Ref | null, escapeChildren?: boolean ); clone( attrs?: HTMLAttributes | SVGAttributes | null, children?: Node, ref?: Ref | null ): TagElement; } class TextElement extends BaseElement { readonly children: string; constructor( key?: Key | null, children?: string ); clone(children?: string): TextElement; } class FragmentElement extends BaseElement { readonly children: Element[] | null; constructor( key?: Key | null, children?: Node ); clone(children?: Node): FragmentElement; } class ComponentElement< TAttrs extends MapLike = MapLike, TChildren = unknown > extends BaseElement { readonly component: ComponentClass; readonly attrs: Readonly; readonly children?: TChildren; readonly ref: Ref> | null; constructor( component: ComponentClass, key?: Key | null, attrs?: TAttrs, children?: TChildren, ref?: Ref> | null ); clone( attrs?: Partial | null, children?: Node, ref?: Ref> | null ): ComponentElement; } class FunctionComponentElement< TAttrs extends MapLike = MapLike, TChildren = unknown > extends BaseElement { readonly component: FunctionComponent; readonly attrs: Readonly; readonly children?: TChildren; constructor( component: FunctionComponent, key?: Key | null, attrs?: TAttrs, children?: TChildren ); clone( attrs?: Partial | null, children?: Node ): FunctionComponentElement; } type Element = TagElement | TextElement | FragmentElement | ComponentElement | FunctionComponentElement; type Node = Element | string | number | boolean | null | undefined | NodeArray; interface NodeArray extends Array {} interface WithKey { key?: Key | null; } interface WithRef { ref?: Ref | null; } interface DOMEventHandler { (event: TEvent): void; } interface DOMAttributes { onAnimationEnd?: DOMEventHandler; onAnimationIteration?: DOMEventHandler; onAnimationStart?: DOMEventHandler; onBlur?: DOMEventHandler; onCanPlay?: DOMEventHandler; onCanPlayThrough?: DOMEventHandler; onChange?: DOMEventHandler; onClick?: DOMEventHandler; onComplete?: DOMEventHandler; onContextMenu?: DOMEventHandler; onCopy?: DOMEventHandler; onCut?: DOMEventHandler; onDblClick?: DOMEventHandler; onDrag?: DOMEventHandler; onDragEnd?: DOMEventHandler; onDragEnter?: DOMEventHandler; onDragLeave?: DOMEventHandler; onDragOver?: DOMEventHandler; onDragStart?: DOMEventHandler; onDrop?: DOMEventHandler; onDurationChange?: DOMEventHandler; onEmptied?: DOMEventHandler; onEnded?: DOMEventHandler; onError?: DOMEventHandler; onFocus?: DOMEventHandler; onGotPointerCapture?: DOMEventHandler; onInput?: DOMEventHandler; onKeyDown?: DOMEventHandler; onKeyPress?: DOMEventHandler; onKeyUp?: DOMEventHandler; onLoad?: DOMEventHandler; onLoadedData?: DOMEventHandler; onLoadedMetadata?: DOMEventHandler; onLoadStart?: DOMEventHandler; onLostPointerCapture?: DOMEventHandler; onMouseDown?: DOMEventHandler; onMouseEnter?: DOMEventHandler; onMouseLeave?: DOMEventHandler; onMouseMove?: DOMEventHandler; onMouseOut?: DOMEventHandler; onMouseOver?: DOMEventHandler; onMouseUp?: DOMEventHandler; onPaste?: DOMEventHandler; onPause?: DOMEventHandler; onPlay?: DOMEventHandler; onPlaying?: DOMEventHandler; onPointerCancel?: DOMEventHandler; onPointerDown?: DOMEventHandler; onPointerEnter?: DOMEventHandler; onPointerLeave?: DOMEventHandler; onPointerMove?: DOMEventHandler; onPointerOut?: DOMEventHandler; onPointerOver?: DOMEventHandler; onPointerUp?: DOMEventHandler; onProgress?: DOMEventHandler; onRateChange?: DOMEventHandler; onScroll?: DOMEventHandler; onSeeked?: DOMEventHandler; onSeeking?: DOMEventHandler; onSelect?: DOMEventHandler; onStalled?: DOMEventHandler; onSubmit?: DOMEventHandler; onSuspend?: DOMEventHandler; onTimeUpdate?: DOMEventHandler; onTouchCancel?: DOMEventHandler; onTouchEnd?: DOMEventHandler; onTouchMove?: DOMEventHandler; onTouchStart?: DOMEventHandler; onTransitionEnd?: DOMEventHandler; onVolumeChange?: DOMEventHandler; onWaiting?: DOMEventHandler; onWheel?: DOMEventHandler; } type CSSProperties = { [key in keyof CSS.Properties]: CSS.Properties[key] | null; } interface HTMLAttributes extends DOMAttributes { accessKey?: string; 'aria-activedescendant'?: string; 'aria-atomic'?: boolean | 'false' | 'true'; 'aria-autocomplete'?: 'none' | 'inline' | 'list' | 'both'; 'aria-busy'?: boolean | 'false' | 'true'; 'aria-checked'?: boolean | 'false' | 'mixed' | 'true'; 'aria-colcount'?: number; 'aria-colindex'?: number; 'aria-colspan'?: number; 'aria-controls'?: string; 'aria-current'?: boolean | 'false' | 'true' | 'page' | 'step' | 'location' | 'date' | 'time'; 'aria-describedby'?: string; 'aria-details'?: string; 'aria-disabled'?: boolean | 'false' | 'true'; 'aria-dropeffect'?: 'none' | 'copy' | 'execute' | 'link' | 'move' | 'popup'; 'aria-errormessage'?: string; 'aria-expanded'?: boolean | 'false' | 'true'; 'aria-flowto'?: string; 'aria-grabbed'?: boolean | 'false' | 'true'; 'aria-haspopup'?: boolean | 'false' | 'true' | 'menu' | 'listbox' | 'tree' | 'grid' | 'dialog'; 'aria-hidden'?: boolean | 'false' | 'true'; 'aria-invalid'?: boolean | 'false' | 'true' | 'grammar' | 'spelling'; 'aria-keyshortcuts'?: string; 'aria-label'?: string; 'aria-labelledby'?: string; 'aria-level'?: number; 'aria-live'?: 'off' | 'assertive' | 'polite'; 'aria-modal'?: boolean | 'false' | 'true'; 'aria-multiline'?: boolean | 'false' | 'true'; 'aria-multiselectable'?: boolean | 'false' | 'true'; 'aria-orientation'?: 'horizontal' | 'vertical'; 'aria-owns'?: string; 'aria-placeholder'?: string; 'aria-posinset'?: number; 'aria-pressed'?: boolean | 'false' | 'mixed' | 'true'; 'aria-readonly'?: boolean | 'false' | 'true'; 'aria-relevant'?: 'additions' | 'additions text' | 'all' | 'removals' | 'text'; 'aria-required'?: boolean | 'false' | 'true'; 'aria-roledescription'?: string; 'aria-rowcount'?: number; 'aria-rowindex'?: number; 'aria-rowspan'?: number; 'aria-selected'?: boolean | 'false' | 'true'; 'aria-setsize'?: number; 'aria-sort'?: 'none' | 'ascending' | 'descending' | 'other'; 'aria-valuemax'?: number; 'aria-valuemin'?: number; 'aria-valuenow'?: number; 'aria-valuetext'?: string; class?: string; contentEditable?: boolean; contextMenu?: string; dir?: string; draggable?: boolean; hidden?: boolean; html?: string, id?: string; inputMode?: string; is?: string; lang?: string; placeholder?: string; radioGroup?: string; role?: string; slot?: string; spellCheck?: boolean; style?: CSSProperties; tabIndex?: number; title?: string; // Non-standard attributes autoCapitalize?: string; autoCorrect?: string; autoSave?: string; color?: string; itemProp?: string; itemScope?: boolean; itemType?: string; itemID?: string; itemRef?: string; results?: number; security?: string; unselectable?: 'on' | 'off'; } type HTMLAttributeReferrerPolicy = '' | 'no-referrer' | 'no-referrer-when-downgrade' | 'origin' | 'origin-when-cross-origin' | 'same-origin' | 'strict-origin' | 'strict-origin-when-cross-origin' | 'unsafe-url'; interface AnchorHTMLAttributes extends HTMLAttributes { download?: any; href?: string; hrefLang?: string; media?: string; ping?: string; rel?: string; target?: string; type?: string; referrerPolicy?: HTMLAttributeReferrerPolicy; } interface AreaHTMLAttributes extends HTMLAttributes { alt?: string; coords?: string; download?: any; href?: string; hrefLang?: string; media?: string; referrerPolicy?: HTMLAttributeReferrerPolicy; rel?: string; shape?: string; target?: string; } interface BaseHTMLAttributes extends HTMLAttributes { href?: string; target?: string; } interface BlockquoteHTMLAttributes extends HTMLAttributes { cite?: string; } interface ButtonHTMLAttributes extends HTMLAttributes { autoFocus?: boolean; disabled?: boolean; form?: string; formAction?: string; formEncType?: string; formMethod?: string; formNoValidate?: boolean; formTarget?: string; name?: string; type?: string; value?: string | string[] | number; } interface CanvasHTMLAttributes extends HTMLAttributes { height?: number | string; width?: number | string; } interface ColHTMLAttributes extends HTMLAttributes { span?: number; width?: number | string; } interface ColgroupHTMLAttributes extends HTMLAttributes { span?: number; } interface DetailsHTMLAttributes extends HTMLAttributes { open?: boolean; } interface DelHTMLAttributes extends HTMLAttributes { cite?: string; dateTime?: string; } interface DialogHTMLAttributes extends HTMLAttributes { open?: boolean; } interface EmbedHTMLAttributes extends HTMLAttributes { height?: number | string; src?: string; type?: string; width?: number | string; } interface FieldsetHTMLAttributes extends HTMLAttributes { disabled?: boolean; form?: string; name?: string; } interface FormHTMLAttributes extends HTMLAttributes { acceptCharset?: string; action?: string; autoComplete?: string; encType?: string; method?: string; name?: string; noValidate?: boolean; target?: string; } interface HtmlHTMLAttributes extends HTMLAttributes { manifest?: string; } interface IframeHTMLAttributes extends HTMLAttributes { allow?: string; allowFullScreen?: boolean; allowTransparency?: boolean; /** @deprecated */ frameBorder?: number | string; height?: number | string; /** @deprecated */ marginHeight?: number; /** @deprecated */ marginWidth?: number; name?: string; referrerPolicy?: HTMLAttributeReferrerPolicy; sandbox?: string; /** @deprecated */ scrolling?: string; seamless?: boolean; src?: string; srcDoc?: string; width?: number | string; } interface ImgHTMLAttributes extends HTMLAttributes { alt?: string; crossOrigin?: 'anonymous' | 'use-credentials' | ''; decoding?: 'async' | 'auto' | 'sync'; height?: number | string; loading?: 'eager' | 'lazy'; referrerPolicy?: HTMLAttributeReferrerPolicy; sizes?: string; src?: string; srcSet?: string; useMap?: string; width?: number | string; } interface InsHTMLAttributes extends HTMLAttributes { cite?: string; dateTime?: string; } interface InputHTMLAttributes extends HTMLAttributes { accept?: string; alt?: string; autoComplete?: string; autoFocus?: boolean; capture?: boolean | string; checked?: boolean; crossOrigin?: string; disabled?: boolean; form?: string; formAction?: string; formEncType?: string; formMethod?: string; formNoValidate?: boolean; formTarget?: string; height?: number | string; list?: string; max?: number | string; maxLength?: number; min?: number | string; minLength?: number; multiple?: boolean; name?: string; pattern?: string; readOnly?: boolean; required?: boolean; size?: number; src?: string; step?: number | string; type?: string; value?: string | string[] | number; width?: number | string; } interface KeygenHTMLAttributes extends HTMLAttributes { autoFocus?: boolean; challenge?: string; disabled?: boolean; form?: string; keyType?: string; keyParams?: string; name?: string; } interface LabelHTMLAttributes extends HTMLAttributes { form?: string; for?: string; } interface LiHTMLAttributes extends HTMLAttributes { value?: string | string[] | number; } interface LinkHTMLAttributes extends HTMLAttributes { as?: string; crossOrigin?: string; href?: string; hrefLang?: string; integrity?: string; media?: string; referrerPolicy?: HTMLAttributeReferrerPolicy; rel?: string; sizes?: string; type?: string; } interface MapHTMLAttributes extends HTMLAttributes { name?: string; } interface MenuHTMLAttributes extends HTMLAttributes { type?: string; } interface MediaHTMLAttributes extends HTMLAttributes { autoPlay?: boolean; controls?: boolean; controlsList?: string; crossOrigin?: string; loop?: boolean; mediaGroup?: string; muted?: boolean; playsinline?: boolean; preload?: string; src?: string; } interface MetaHTMLAttributes extends HTMLAttributes { charSet?: string; content?: string; httpEquiv?: string; name?: string; } interface MeterHTMLAttributes extends HTMLAttributes { form?: string; high?: number; low?: number; max?: number | string; min?: number | string; optimum?: number; value?: string | string[] | number; } interface QuoteHTMLAttributes extends HTMLAttributes { cite?: string; } interface ObjectHTMLAttributes extends HTMLAttributes { classID?: string; data?: string; form?: string; height?: number | string; name?: string; type?: string; useMap?: string; width?: number | string; wmode?: string; } interface OlHTMLAttributes extends HTMLAttributes { reversed?: boolean; start?: number; type?: '1' | 'a' | 'A' | 'i' | 'I'; } interface OptgroupHTMLAttributes extends HTMLAttributes { disabled?: boolean; label?: string; } interface OptionHTMLAttributes extends HTMLAttributes { disabled?: boolean; label?: string; selected?: boolean; value?: string | string[] | number; } interface OutputHTMLAttributes extends HTMLAttributes { form?: string; for?: string; name?: string; } interface ParamHTMLAttributes extends HTMLAttributes { name?: string; value?: string | string[] | number; } interface ProgressHTMLAttributes extends HTMLAttributes { max?: number | string; value?: string | string[] | number; } interface ScriptHTMLAttributes extends HTMLAttributes { async?: boolean; charSet?: string; crossOrigin?: string; defer?: boolean; integrity?: string; noModule?: boolean; nonce?: string; referrerPolicy?: HTMLAttributeReferrerPolicy; src?: string; type?: string; } interface SelectHTMLAttributes extends HTMLAttributes { autoComplete?: string; autoFocus?: boolean; disabled?: boolean; form?: string; multiple?: boolean; name?: string; required?: boolean; size?: number; value?: string | string[] | number; } interface SourceHTMLAttributes extends HTMLAttributes { media?: string; sizes?: string; src?: string; srcSet?: string; type?: string; } interface StyleHTMLAttributes extends HTMLAttributes { media?: string; nonce?: string; scoped?: boolean; type?: string; } interface TableHTMLAttributes extends HTMLAttributes { cellPadding?: number | string; cellSpacing?: number | string; summary?: string; } interface TextareaHTMLAttributes extends HTMLAttributes { autoComplete?: string; autoFocus?: boolean; cols?: number; dirName?: string; disabled?: boolean; form?: string; maxLength?: number; minLength?: number; name?: string; placeholder?: string; readOnly?: boolean; required?: boolean; rows?: number; value?: string | string[] | number; wrap?: string; } interface TdHTMLAttributes extends HTMLAttributes { align?: 'left' | 'center' | 'right' | 'justify' | 'char'; colSpan?: number; headers?: string; rowSpan?: number; scope?: string; } interface ThHTMLAttributes extends HTMLAttributes { align?: 'left' | 'center' | 'right' | 'justify' | 'char'; colSpan?: number; headers?: string; rowSpan?: number; scope?: string; } interface TimeHTMLAttributes extends HTMLAttributes { dateTime?: string; } interface TrackHTMLAttributes extends HTMLAttributes { default?: boolean; kind?: string; label?: string; src?: string; srcLang?: string; } interface VideoHTMLAttributes extends MediaHTMLAttributes { height?: number | string; poster?: string; width?: number | string; } interface SVGAttributes extends DOMAttributes { class?: string; color?: string; height?: number | string; id?: string; lang?: string; max?: number | string; media?: string; method?: string; min?: number | string; name?: string; style?: CSSProperties; target?: string; type?: string; width?: number | string; accentHeight?: number | string; accumulate?: 'none' | 'sum'; additive?: 'replace' | 'sum'; alignmentBaseline?: 'auto' | 'baseline' | 'before-edge' | 'text-before-edge' | 'middle' | 'central' | 'after-edge' | 'text-after-edge' | 'ideographic' | 'alphabetic' | 'hanging' | 'mathematical' | 'inherit'; allowReorder?: 'no' | 'yes'; alphabetic?: number | string; amplitude?: number | string; arabicForm?: 'initial' | 'medial' | 'terminal' | 'isolated'; ascent?: number | string; attributeName?: string; attributeType?: string; autoReverse?: number | string; azimuth?: number | string; baseFrequency?: number | string; baselineShift?: number | string; baseProfile?: number | string; bbox?: number | string; begin?: number | string; bias?: number | string; by?: number | string; calcMode?: number | string; capHeight?: number | string; clip?: number | string; clipPath?: string; clipPathUnits?: number | string; clipRule?: number | string; colorInterpolation?: number | string; colorInterpolationFilters?: 'auto' | 'sRGB' | 'linearRGB' | 'inherit'; colorProfile?: number | string; colorRendering?: number | string; contentScriptType?: number | string; contentStyleType?: number | string; cursor?: number | string; cx?: number | string; cy?: number | string; d?: string; decelerate?: number | string; descent?: number | string; diffuseConstant?: number | string; direction?: number | string; display?: number | string; divisor?: number | string; dominantBaseline?: number | string; dur?: number | string; dx?: number | string; dy?: number | string; edgeMode?: number | string; elevation?: number | string; enableBackground?: number | string; end?: number | string; exponent?: number | string; externalResourcesRequired?: number | string; fill?: string; fillOpacity?: number | string; fillRule?: 'nonzero' | 'evenodd' | 'inherit'; filter?: string; filterRes?: number | string; filterUnits?: number | string; floodColor?: number | string; floodOpacity?: number | string; focusable?: number | string; fontFamily?: string; fontSize?: number | string; fontSizeAdjust?: number | string; fontStretch?: number | string; fontStyle?: number | string; fontVariant?: number | string; fontWeight?: number | string; format?: number | string; from?: number | string; fx?: number | string; fy?: number | string; g1?: number | string; g2?: number | string; glyphName?: number | string; glyphOrientationHorizontal?: number | string; glyphOrientationVertical?: number | string; glyphRef?: number | string; gradientTransform?: string; gradientUnits?: string; hanging?: number | string; horizAdvX?: number | string; horizOriginX?: number | string; ideographic?: number | string; imageRendering?: number | string; in2?: number | string; in?: string; intercept?: number | string; k1?: number | string; k2?: number | string; k3?: number | string; k4?: number | string; k?: number | string; kernelMatrix?: number | string; kernelUnitLength?: number | string; kerning?: number | string; keyPoints?: number | string; keySplines?: number | string; keyTimes?: number | string; lengthAdjust?: number | string; letterSpacing?: number | string; lightingColor?: number | string; limitingConeAngle?: number | string; local?: number | string; markerEnd?: string; markerHeight?: number | string; markerMid?: string; markerStart?: string; markerUnits?: number | string; markerWidth?: number | string; mask?: string; maskContentUnits?: number | string; maskUnits?: number | string; mathematical?: number | string; mode?: number | string; numOctaves?: number | string; offset?: number | string; opacity?: number | string; operator?: number | string; order?: number | string; orient?: number | string; orientation?: number | string; origin?: number | string; overflow?: number | string; overlinePosition?: number | string; overlineThickness?: number | string; paintOrder?: number | string; panose1?: number | string; pathLength?: number | string; patternContentUnits?: string; patternTransform?: number | string; patternUnits?: string; pointerEvents?: number | string; points?: string; pointsAtX?: number | string; pointsAtY?: number | string; pointsAtZ?: number | string; preserveAlpha?: number | string; preserveAspectRatio?: string; primitiveUnits?: number | string; r?: number | string; radius?: number | string; refX?: number | string; refY?: number | string; renderingIntent?: number | string; repeatCount?: number | string; repeatDur?: number | string; requiredExtensions?: number | string; requiredFeatures?: number | string; restart?: number | string; result?: string; rotate?: number | string; rx?: number | string; ry?: number | string; scale?: number | string; seed?: number | string; shapeRendering?: number | string; slope?: number | string; spacing?: number | string; specularConstant?: number | string; specularExponent?: number | string; speed?: number | string; spreadMethod?: string; startOffset?: number | string; stdDeviation?: number | string; stemh?: number | string; stemv?: number | string; stitchTiles?: number | string; stopColor?: string; stopOpacity?: number | string; strikethroughPosition?: number | string; strikethroughThickness?: number | string; string?: number | string; stroke?: string; strokeDasharray?: string | number; strokeDashoffset?: string | number; strokeLinecap?: 'butt' | 'round' | 'square' | 'inherit'; strokeLinejoin?: 'miter' | 'round' | 'bevel' | 'inherit'; strokeMiterlimit?: string; strokeOpacity?: number | string; strokeWidth?: number | string; surfaceScale?: number | string; systemLanguage?: number | string; tableValues?: number | string; targetX?: number | string; targetY?: number | string; textAnchor?: string; textDecoration?: number | string; textLength?: number | string; textRendering?: number | string; to?: number | string; transform?: string; u1?: number | string; u2?: number | string; underlinePosition?: number | string; underlineThickness?: number | string; unicode?: number | string; unicodeBidi?: number | string; unicodeRange?: number | string; unitsPerEm?: number | string; vAlphabetic?: number | string; values?: string; vectorEffect?: number | string; version?: string; vertAdvY?: number | string; vertOriginX?: number | string; vertOriginY?: number | string; vHanging?: number | string; vIdeographic?: number | string; viewBox?: string; viewTarget?: number | string; visibility?: number | string; vMathematical?: number | string; widths?: number | string; wordSpacing?: number | string; writingMode?: number | string; x1?: number | string; x2?: number | string; x?: number | string; xChannelSelector?: string; xHeight?: number | string; xlinkActuate?: string; xlinkArcrole?: string; xlinkHref?: string; xlinkRole?: string; xlinkShow?: string; xlinkTitle?: string; xlinkType?: string; xmlBase?: string; xmlLang?: string; xmlns?: string; xmlnsXlink?: string; xmlSpace?: string; y1?: number | string; y2?: number | string; y?: number | string; yChannelSelector?: string; z?: number | string; zoomAndPan?: string; } function elem( tag: 'fragment', key?: Key | null, children?: Node ): FragmentElement; function elem( tag: 'plaintext', key?: Key | null, children?: string ): TextElement; function elem( tag: string, key?: Key | null, attrs?: HTMLAttributes | SVGAttributes | null, children?: Node, ref?: Ref | null, escapeChildren?: boolean ): TagElement; function elem ( component: FunctionComponent, key?: Key | null, attrs?: TAttrs, children?: TChildren ): FunctionComponentElement; function elem( component: ComponentClass, key?: Key | null, attrs?: TAttrs, children?: TChildren, ref?: Ref> | null ): ComponentElement; function mount(domElem: DOMElement, node: Node, callback?: () => void): void; function mount(domElem: DOMElement, node: Node, context?: MapLike, callback?: () => void): void; function mountSync(domElem: DOMElement, node: Node, context?: MapLike): void; function unmount(domElem: DOMElement, callback?: () => void): void; function unmountSync(domElem: DOMElement): void; function renderToString(node: Node): string; function toElem(node: Node): Element; function toElems(node: Node): Element[]; function h( tag: 'fragment', props: WithKey | null, ...children: Node[] ): FragmentElement; function h( tag: 'plaintext', props: WithKey | null, ...children: string[] ): TextElement; function h( tag: string, props: ( ( (HTMLAttributes & WithRef) | (SVGAttributes & WithRef) ) & WithKey ) | null, ...children: Node[] ): TagElement; function h ( component: FunctionComponent, props: (TAttrs & WithKey) | null, children?: TChildren ): FunctionComponentElement; function h< TAttrs, TChildren >( component: ComponentClass, props: (TAttrs & WithRef & WithKey) | null, children?: TChildren ): ComponentElement; const IS_DEBUG: boolean; } declare global { namespace JSX { type Element = vidom.Element; type ElementClass = vidom.Component; type ElementAttributesProperty = { attrs: {}; }; // type LibraryManagedAttributes = TComponent extends { defaultAttrs: infer DefaultAttrs; }? // TAttrs extends any? // string extends keyof TAttrs? // TAttrs : // Pick> & // Partial>> & // Partial>> : // never : // TAttrs; interface IntrinsicAttributes extends vidom.WithKey {} interface IntrinsicClassAttributes extends vidom.WithKey, vidom.WithRef {} type IntrinsicHTMLAttributes< THTMLAttributes extends vidom.HTMLAttributes = vidom.HTMLAttributes, THTMLElement extends HTMLElement = HTMLElement > = THTMLAttributes & vidom.HTMLAttributes & vidom.WithRef & vidom.WithKey; interface IntrinsicSVGAttributes extends vidom.SVGAttributes, vidom.WithRef, vidom.WithKey {} interface IntrinsicElements { fragment: vidom.WithKey; plaintext: vidom.WithKey; a: IntrinsicHTMLAttributes; abbr: IntrinsicHTMLAttributes; address: IntrinsicHTMLAttributes; area: IntrinsicHTMLAttributes; article: IntrinsicHTMLAttributes; aside: IntrinsicHTMLAttributes; audio: IntrinsicHTMLAttributes; b: IntrinsicHTMLAttributes; base: IntrinsicHTMLAttributes; bdi: IntrinsicHTMLAttributes; bdo: IntrinsicHTMLAttributes; big: IntrinsicHTMLAttributes; blockquote: IntrinsicHTMLAttributes; body: IntrinsicHTMLAttributes; br: IntrinsicHTMLAttributes; button: IntrinsicHTMLAttributes; canvas: IntrinsicHTMLAttributes; caption: IntrinsicHTMLAttributes; cite: IntrinsicHTMLAttributes; code: IntrinsicHTMLAttributes; col: IntrinsicHTMLAttributes; colgroup: IntrinsicHTMLAttributes; data: IntrinsicHTMLAttributes; datalist: IntrinsicHTMLAttributes; dd: IntrinsicHTMLAttributes; del: IntrinsicHTMLAttributes; details: IntrinsicHTMLAttributes; dfn: IntrinsicHTMLAttributes; dialog: IntrinsicHTMLAttributes; div: IntrinsicHTMLAttributes; dl: IntrinsicHTMLAttributes; dt: IntrinsicHTMLAttributes; em: IntrinsicHTMLAttributes; embed: IntrinsicHTMLAttributes; fieldset: IntrinsicHTMLAttributes; figcaption: IntrinsicHTMLAttributes; figure: IntrinsicHTMLAttributes; footer: IntrinsicHTMLAttributes; form: IntrinsicHTMLAttributes; h1: IntrinsicHTMLAttributes; h2: IntrinsicHTMLAttributes; h3: IntrinsicHTMLAttributes; h4: IntrinsicHTMLAttributes; h5: IntrinsicHTMLAttributes; h6: IntrinsicHTMLAttributes; head: IntrinsicHTMLAttributes; header: IntrinsicHTMLAttributes; hgroup: IntrinsicHTMLAttributes; hr: IntrinsicHTMLAttributes; html: IntrinsicHTMLAttributes; i: IntrinsicHTMLAttributes; iframe: IntrinsicHTMLAttributes; img: IntrinsicHTMLAttributes; input: IntrinsicHTMLAttributes; ins: IntrinsicHTMLAttributes; kbd: IntrinsicHTMLAttributes; keygen: IntrinsicHTMLAttributes; label: IntrinsicHTMLAttributes; legend: IntrinsicHTMLAttributes; li: IntrinsicHTMLAttributes; link: IntrinsicHTMLAttributes; main: IntrinsicHTMLAttributes; map: IntrinsicHTMLAttributes; mark: IntrinsicHTMLAttributes; menu: IntrinsicHTMLAttributes; menuitem: IntrinsicHTMLAttributes; meta: IntrinsicHTMLAttributes; meter: IntrinsicHTMLAttributes; nav: IntrinsicHTMLAttributes; noindex: IntrinsicHTMLAttributes; noscript: IntrinsicHTMLAttributes; object: IntrinsicHTMLAttributes; ol: IntrinsicHTMLAttributes; optgroup: IntrinsicHTMLAttributes; option: IntrinsicHTMLAttributes; output: IntrinsicHTMLAttributes; p: IntrinsicHTMLAttributes; param: IntrinsicHTMLAttributes; picture: IntrinsicHTMLAttributes; pre: IntrinsicHTMLAttributes; progress: IntrinsicHTMLAttributes; q: IntrinsicHTMLAttributes; rp: IntrinsicHTMLAttributes; rt: IntrinsicHTMLAttributes; ruby: IntrinsicHTMLAttributes; s: IntrinsicHTMLAttributes; samp: IntrinsicHTMLAttributes; script: IntrinsicHTMLAttributes; section: IntrinsicHTMLAttributes; select: IntrinsicHTMLAttributes; small: IntrinsicHTMLAttributes; source: IntrinsicHTMLAttributes; span: IntrinsicHTMLAttributes; strong: IntrinsicHTMLAttributes; style: IntrinsicHTMLAttributes; sub: IntrinsicHTMLAttributes; summary: IntrinsicHTMLAttributes; sup: IntrinsicHTMLAttributes; table: IntrinsicHTMLAttributes; tbody: IntrinsicHTMLAttributes; td: IntrinsicHTMLAttributes; textarea: IntrinsicHTMLAttributes; tfoot: IntrinsicHTMLAttributes; th: IntrinsicHTMLAttributes; thead: IntrinsicHTMLAttributes; time: IntrinsicHTMLAttributes; title: IntrinsicHTMLAttributes; tr: IntrinsicHTMLAttributes; track: IntrinsicHTMLAttributes; u: IntrinsicHTMLAttributes; ul: IntrinsicHTMLAttributes; 'var': IntrinsicHTMLAttributes; video: IntrinsicHTMLAttributes; wbr: IntrinsicHTMLAttributes; // SVG svg: IntrinsicSVGAttributes; animate: IntrinsicSVGAttributes; circle: IntrinsicSVGAttributes; clipPath: IntrinsicSVGAttributes; defs: IntrinsicSVGAttributes; desc: IntrinsicSVGAttributes; ellipse: IntrinsicSVGAttributes; feBlend: IntrinsicSVGAttributes; feColorMatrix: IntrinsicSVGAttributes; feComponentTransfer: IntrinsicSVGAttributes; feComposite: IntrinsicSVGAttributes; feConvolveMatrix: IntrinsicSVGAttributes; feDiffuseLighting: IntrinsicSVGAttributes; feDisplacementMap: IntrinsicSVGAttributes; feDistantLight: IntrinsicSVGAttributes; feFlood: IntrinsicSVGAttributes; feFuncA: IntrinsicSVGAttributes; feFuncB: IntrinsicSVGAttributes; feFuncG: IntrinsicSVGAttributes; feFuncR: IntrinsicSVGAttributes; feGaussianBlur: IntrinsicSVGAttributes; feImage: IntrinsicSVGAttributes; feMerge: IntrinsicSVGAttributes; feMergeNode: IntrinsicSVGAttributes; feMorphology: IntrinsicSVGAttributes; feOffset: IntrinsicSVGAttributes; fePointLight: IntrinsicSVGAttributes; feSpecularLighting: IntrinsicSVGAttributes; feSpotLight: IntrinsicSVGAttributes; feTile: IntrinsicSVGAttributes; feTurbulence: IntrinsicSVGAttributes; filter: IntrinsicSVGAttributes; foreignObject: IntrinsicSVGAttributes; g: IntrinsicSVGAttributes; image: IntrinsicSVGAttributes; line: IntrinsicSVGAttributes; linearGradient: IntrinsicSVGAttributes; marker: IntrinsicSVGAttributes; mask: IntrinsicSVGAttributes; metadata: IntrinsicSVGAttributes; path: IntrinsicSVGAttributes; pattern: IntrinsicSVGAttributes; polygon: IntrinsicSVGAttributes; polyline: IntrinsicSVGAttributes; radialGradient: IntrinsicSVGAttributes; rect: IntrinsicSVGAttributes; stop: IntrinsicSVGAttributes; switch: IntrinsicSVGAttributes; symbol: IntrinsicSVGAttributes; text: IntrinsicSVGAttributes; textPath: IntrinsicSVGAttributes; tspan: IntrinsicSVGAttributes; use: IntrinsicSVGAttributes; view: IntrinsicSVGAttributes; } } }