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

Enhance types of standard HTML attributes using Type Literals (ex: input "type") #37

Open
LolliDepp opened this issue Jul 17, 2019 · 0 comments

Comments

@LolliDepp
Copy link

None of the DOM types exposed by /types/dom.d.ts are using the Type Literals feature - and it would work great I think.

Example: this is the current declaration for the "type" attribute on the "input" interface:
type?: string;
A more accurate type definition would be:
type?: 'text' | 'button' | 'submit'; // other literals are omitted for brevity

this will allow intellisense to suggest possible values for type.

same if true for other attributes

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

1 participant