Hyperhtml: [Suggestion] Add types to hyperHTML

Created on 7 Feb 2018  路  3Comments  路  Source: WebReflection/hyperHTML

By adding types to support Typescript, you can increase the reach of this package and make its use more organic.

https://github.com/DefinitelyTyped/DefinitelyTyped/

enhancement

Most helpful comment

types are in 2.6 :tada: :balloon:

All 3 comments

I don't have experience with ... any help ? here various signatures, I think types when it comes to template literals tag functions might mislead.

bind(node)`content` === node
// but
bind(node) is a Function

Anyway, following the current signature

bind(node:HTMLElement):Function
wire(void|any):Function
wire(void|any,info:string):Function
Component(definition):class

Maybe it would make sense to return HyperTemplateFunction and define it somewhere else as interface?

Any help to do this right woule be appreciated.

I'll look deeper into the package and make a pull request as a recommendation. Thanks for the welcome.

types are in 2.6 :tada: :balloon:

Was this page helpful?
0 / 5 - 0 ratings

Related issues

varunkumar picture varunkumar  路  6Comments

Scott-MacD picture Scott-MacD  路  6Comments

pmowrer picture pmowrer  路  5Comments

janrembold picture janrembold  路  8Comments

rektide picture rektide  路  8Comments