README
h
An alternative implementation of the excellent hyperscript library. Makes use of typescript 4.1 template literal types to infer element types.
- Supports SVG elements.
const element = h("div#someId", { onclick: handleClick }, [
h("p.someClass", "Hello"),
h("p.someClass", "World"),
]);
// Type inferred using typescript 4.1 beta template literals
type MyElement = typeof element; // HTMLDivElement