Skip to content

Commit 506aeb8

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 3fcb7a8 commit 506aeb8

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/declarations/stencil-public-runtime.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -936,8 +936,8 @@ export namespace JSXBase {
936936
accept?: string;
937937
allowdirs?: boolean;
938938
alt?: string;
939-
autoCapitalize?: any;
940-
autocapitalize?: any;
939+
autoCapitalize?: string;
940+
autocapitalize?: string;
941941
autoComplete?: string;
942942
autocomplete?: string;
943943
autoFocus?: boolean;
@@ -1299,8 +1299,8 @@ export namespace JSXBase {
12991299
vocab?: string;
13001300

13011301
// Non-standard Attributes
1302-
autoCapitalize?: any;
1303-
autocapitalize?: any;
1302+
autoCapitalize?: string;
1303+
autocapitalize?: string;
13041304
autoCorrect?: string;
13051305
autocorrect?: string;
13061306
autoSave?: string;

0 commit comments

Comments
 (0)