Skip to content

Commit

Permalink
fix(runtime): autocapitalize property is a string (#3692)
Browse files Browse the repository at this point in the history
In #2509, we changed these types to `any` as suggested by Manu. This was done to fix ionic-team/ionic-framework#21464.

Upon further investigation we found that this fix was not correct. The Framework issue had nothing to do with the types on `HTMLStencilElement` and instead were related to the types on `HTMLElement`.

It's worth noting we didn't got the route of specifying the allowed strings further to `'off' | 'on' | 'none' | 'sentences' | 'words' | 'characters'` to align with `lib.dom.d.ts` that's shipped with TypeScript, which just types this property as `string` (on `HTMLElement`). Had we done that, we could/would have run into issues where `string` isn't assignable to `'off' | 'on' | 'none' | 'sentences' | 'words' | 'characters'`, as the former is wider than that latter.
  • Loading branch information
liamdebeasi authored and rwaskiewicz committed Jan 24, 2023
1 parent 5fde5d2 commit 182c5c1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/declarations/stencil-public-runtime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -993,8 +993,8 @@ export namespace JSXBase {
accept?: string;
allowdirs?: boolean;
alt?: string;
autoCapitalize?: any;
autocapitalize?: any;
autoCapitalize?: string;
autocapitalize?: string;
autoComplete?: string;
autocomplete?: string;
autoFocus?: boolean;
Expand Down Expand Up @@ -1356,8 +1356,8 @@ export namespace JSXBase {
vocab?: string;

// Non-standard Attributes
autoCapitalize?: any;
autocapitalize?: any;
autoCapitalize?: string;
autocapitalize?: string;
autoCorrect?: string;
autocorrect?: string;
autoSave?: string;
Expand Down

0 comments on commit 182c5c1

Please sign in to comment.