// This file is a result from many sources, including: RFCs, typescript dom lib, w3schools, and others. // Possibly there are many tags/attributes missing, but it is a good start. // Missing something? Please submit a issue report or a PR: // https://github.com/kitajs/html /** Same as a string type but allows autocompletion of literal values */ type AnyString = string & {}; declare namespace JSX { /** * A {@linkcode JSX.Element} will always be a string, unless one of its children is a * promise, in which case all of its subsequent children will also be promises. * * Direct calls of `Html.createElement` uses correct return type based on its children. * However, when using JSX syntax, typescript does not support this yet. * * @see https://github.com/microsoft/TypeScript/issues/14729 */ type Element = string | Promise; /** * The index signature was removed to enable closed typing for style using CSSType. * You're able to use type assertion or module augmentation to add properties or an * index signature of your own. * * For examples and more information, visit: * https://github.com/frenic/csstype#what-should-i-do-when-i-get-type-errors */ type CSSProperties = import('csstype').Properties; interface HtmlTag extends ElementChildrenAttribute, IntrinsicAttributes { accesskey?: undefined | string; autocapitalize?: | undefined | 'off' | 'none' | 'on' | 'sentences' | 'words' | 'characters' | AnyString; autocorrect?: undefined | 'on' | 'off' | AnyString; contenteditable?: undefined | string; enterkeyhint?: | undefined | 'enter' | 'done' | 'go' | 'next' | 'previous' | 'search' | 'send' | AnyString; inert?: undefined | boolean; inputmode?: | undefined | 'none' | 'text' | 'decimal' | 'numeric' | 'tel' | 'search' | 'email' | 'url' | AnyString; dir?: undefined | string; hidden?: undefined | string | boolean; id?: undefined | number | string; nonce?: undefined | string; part?: undefined | string; popover?: undefined | boolean | 'auto' | 'manual'; role?: undefined | AriaRole; lang?: undefined | string; slot?: undefined | string; draggable?: undefined | string | boolean; spellcheck?: undefined | string | boolean; tabindex?: undefined | number | string; title?: undefined | string; translate?: undefined | string | boolean; virtualkeyboardpolicy?: undefined | 'auto' | 'manual' | AnyString; writingsuggestions?: undefined | 'true' | 'false' | AnyString; /** A css style attribute which also supports a `csstype` object. */ style?: undefined | string | CSSProperties; /** * When set to true, all inner content (html or not) of this tag will be escaped when * evaluated. * * **Warning: This will escape even inner jsx tags. You should only use this in the * most inner tag of the html tree.** * * @example * * ```tsx *
{'