@sebastbake/h
TypeScript icon, indicating that this package has built-in type declarations

1.1.0 • Public • Published

h

size downloads npm GitHub

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

Readme

Keywords

none

Package Sidebar

Install

npm i @sebastbake/h

Weekly Downloads

0

Version

1.1.0

License

MIT

Unpacked Size

6.52 kB

Total Files

7

Last publish

Collaborators

  • sebastbake