Skip to content

Instantly share code, notes, and snippets.

@joeynguyen
Created August 29, 2022 05:59
Show Gist options
  • Save joeynguyen/50ad241a18cab3573632523ebfcc121e to your computer and use it in GitHub Desktop.
Save joeynguyen/50ad241a18cab3573632523ebfcc121e to your computer and use it in GitHub Desktop.
AutoComplete TypeScript type
export type AutoComplete =
| "off"
| "on"
| "name"
| "honorific-prefix"
| "given-name"
| "additional-name"
| "family-name"
| "honorific-suffix"
| "nickname"
| "email"
| "username"
| "new-password"
| "current-password"
| "address-level1"
| "address-level2"
| "address-level3"
| "address-level4"
| "address-line1"
| "address-line2"
| "address-line3"
| "bday-day"
| "bday-month"
| "bday-year"
| "bday"
| "cc-additional-name"
| "cc-csc"
| "cc-exp-month"
| "cc-exp-year"
| "cc-exp"
| "cc-family-name"
| "cc-given-name"
| "cc-name"
| "cc-number"
| "cc-type"
| "country-name"
| "country"
| "impp"
| "language"
| "one-time-code"
| "organization-title"
| "organization"
| "photo"
| "postal-code"
| "sex"
| "street-address"
| "tel-area-code"
| "tel-country-code"
| "tel-extension"
| "tel-local"
| "tel-national"
| "tel"
| "transaction-amount"
| "transaction-currency"
| "url";
@joeynguyen
Copy link
Author

This is not necessary if you use & React.InputHTMLAttributes<HTMLInputElement>

see: https://stackoverflow.com/questions/70392508/react-hook-form-usecontroller-typescript-type-error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment