@sebastbake/h
v1.1.0
Published
An alternative implementation of the excellent hyperscript library. Makes use of typescript 4.1 template literal types to infer element types.
Downloads
6
Readme
h
An alternative implementation of the excellent hyperscript library. Makes use of typescript 4.1 template literal types to infer element types.
- [x] 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