Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeScript typings #39

Open
fogzot opened this issue Dec 11, 2021 · 1 comment
Open

TypeScript typings #39

fogzot opened this issue Dec 11, 2021 · 1 comment

Comments

@fogzot
Copy link

fogzot commented Dec 11, 2021

It would be nice to have TypeScript typings included in the htl package. Adding an index.d.ts file with the following content should be sufficient to import and use the package:

export declare const html: { <T extends HTMLElement | Text>(...args: any[]): T, fragment(...args: any[]): DocumentFragment };
export declare const svg: { <T extends SVGElement | Text>(...args: any[]): T, fragment(...args: any[]): DocumentFragment };

Let me know if you want a proper pull request or if the example code above is enough.

@ValentinAtQuintessence
Copy link

I second this request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants