Extending JSX Types
Estimated reading time: less than 1 minuteKita Html's type system can be extended to support custom elements, custom attributes, or both.
Custom elements
Declare new entries in JSX.IntrinsicElements to add custom HTML elements with typed
attributes.
Custom attributes on all elements
Extend the HtmlTag interface to add attributes to every native HTML element.
Allow any tag and attribute
If you need to bypass type checking entirely, add a triple-slash directive to your
src/kita.d.ts file. This is not recommended for production code.
src/kita.d.ts
Or add it globally in tsconfig.json:
tsconfig.json