-
Notifications
You must be signed in to change notification settings - Fork 35
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
Thoughts on TypeScript support? #25
Comments
For my project, I cheated by pulling in Preact's type definitions. I have a declare module "vhtml" {
function h(name: string, attrs?: Record<string, any>): string;
// Let's borrow JSX types from Preact
import { JSX } from "preact";
namespace JSX {
export import IntrinsicElements = JSX.IntrinsicElements;
export type Element = string;
}
} Obviously very hacky, needs much improvement, and not recommended for professional setups. |
I wrote some type definitions and made a PR to DefinitelyTyped. |
@types/vhtml is now public. I think we can close this issue. |
Nice work @pastelmind |
First of all, great project. The simplicity is beautiful.
I am curious on your thoughts on adding typings in some form to this repo from a maintainer perspective. I am happy to do the work here, but don't want to create a maintenance burden.
In order of personal preference:
.d.ts
files to the current implementation?@types/vhtml
?The text was updated successfully, but these errors were encountered: