-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Add more precise typing for autoComplete HTML attribute #52169
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
Conversation
This will allow to autocomplete… the `autoComplete` attribute in vscode for example. blob:vector://vector/f78d41f4-76af-4c04-b3e2-6c594d97f3e2 The list is quite long and it's not easy remembering the spelling of each one of them (first_name or given-name? password or current-password?), and it would improve the UX of sites if they were more appropriately used (for example, some people may think that the input's `type` and/or `name` attributes may be enough for fields like email or password, but knowing to use `autoComplete="new-password"` or `one-time-code` can be really useful). I can also add a description above the `autoComplete` line, something like that: ```ts /** See https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete * and https://html.spec.whatwg.org/multipage/forms.html#autofill * for more information and examples. */ ``` and I can even add [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete#values)'s descriptions above each value, as they are really well explained and some of them may not always be intuitive at first glance. I didn't add them for now, as it looks like the list is kept quite compact. Please tell me if I need to make any changes or improvements.
It looks like you've sent a pull request to update our 'lib' files. These files aren't meant to be edited by hand, as they consist of last-known good states of the compiler and are generated from 'src/lib' or possibly our lib generator. Unless this is necessary, consider closing the pull request and sending a separate PR to update 'src/lib' or https://github.com/microsoft/TypeScript-DOM-lib-generator |
It looks like you've sent a pull request to update some generated declaration files related to the DOM. These files aren't meant to be edited by hand, as they are synchronized with files in the TSJS-lib-generator repository. You can read more here. For house-keeping purposes, this pull request will be closed. |
Replaces: microsoft/TypeScript#52169 This will allow to autocomplete… the `autoComplete` attribute in vscode for example.  The list is quite long and it's not easy remembering the spelling of each one of them (first_name or given-name? password or current-password?), and it would improve the UX of sites if they were more appropriately used (for example, some people may think that the input's `type` and/or `name` attributes may be enough for fields like email or password, but knowing to use `autoComplete="new-password"` or `one-time-code` can be really useful).
Replaced with: microsoft/TypeScript-DOM-lib-generator#1467 |
Replaces: microsoft/TypeScript#52169 This will allow to autocomplete… the `autoComplete` attribute in vscode for example.  The list is quite long and it's not easy remembering the spelling of each one of them (first_name or given-name? password or current-password?), and it would improve the UX of sites if they were more appropriately used (for example, some people may think that the input's `type` and/or `name` attributes may be enough for fields like email or password, but knowing to use `autoComplete="new-password"` or `one-time-code` can be really useful).
Replaces: microsoft/TypeScript#52169 This will allow to autocomplete… the `autoComplete` attribute in vscode for example.  The list is quite long and it's not easy remembering the spelling of each one of them (first_name or given-name? password or current-password?), and it would improve the UX of sites if they were more appropriately used (for example, some people may think that the input's `type` and/or `name` attributes may be enough for fields like email or password, but knowing to use `autoComplete="new-password"` or `one-time-code` can be really useful).
Replaces: microsoft/TypeScript#52169 This will allow to autocomplete… the `autoComplete` attribute in vscode for example.  The list is quite long and it's not easy remembering the spelling of each one of them (first_name or given-name? password or current-password?), and it would improve the UX of sites if they were more appropriately used (for example, some people may think that the input's `type` and/or `name` attributes may be enough for fields like email or password, but knowing to use `autoComplete="new-password"` or `one-time-code` can be really useful).
Add more precise typing for autoComplete HTML attribute instead of just
?string
.This will allow to autocomplete… the
autoComplete
attribute in vscode for example.The list is quite long and it's not easy remembering the spelling of each one of them (first_name or given-name? password or current-password?), and it would improve the UX of sites if they were more appropriately used (for example, some people may think that the input's
type
and/orname
attributes may be enough for fields like email or password, but knowing to useautoComplete="new-password"
orone-time-code
can be really useful).I can also add a description above the
autoComplete
line, something like that:and I can even add MDN's descriptions above each value, as they are really well explained and some of them may not always be intuitive at first glance. I didn't add them for now, as it looks like the list is kept quite compact.
Please tell me if I need to make any changes or improvements.
Fixes #52168