Skip to content

Commit 650a355

Browse files
liamdebeasirwaskiewicz
authored andcommitted
fix(runtime): autocapitalize property is a string (#3692)
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.
1 parent b8ed386 commit 650a355

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/declarations/stencil-public-runtime.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -993,8 +993,8 @@ export namespace JSXBase {
993993
accept?: string;
994994
allowdirs?: boolean;
995995
alt?: string;
996-
autoCapitalize?: any;
997-
autocapitalize?: any;
996+
autoCapitalize?: string;
997+
autocapitalize?: string;
998998
autoComplete?: string;
999999
autocomplete?: string;
10001000
autoFocus?: boolean;
@@ -1356,8 +1356,8 @@ export namespace JSXBase {
13561356
vocab?: string;
13571357

13581358
// Non-standard Attributes
1359-
autoCapitalize?: any;
1360-
autocapitalize?: any;
1359+
autoCapitalize?: string;
1360+
autocapitalize?: string;
13611361
autoCorrect?: string;
13621362
autocorrect?: string;
13631363
autoSave?: string;

0 commit comments

Comments
 (0)