From e4a7fb662cd8cccac048a1e4f3ba6e3152985055 Mon Sep 17 00:00:00 2001 From: Liam DeBeasi Date: Fri, 7 Oct 2022 13:20:50 -0500 Subject: [PATCH] fix(runtime): autocapitalize property is a string (#3692) In https://github.com/ionic-team/stencil/pull/2509, we changed these types to `any` as suggested by Manu. This was done to fix https://github.com/ionic-team/ionic-framework/pull/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. --- src/declarations/stencil-public-runtime.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/declarations/stencil-public-runtime.ts b/src/declarations/stencil-public-runtime.ts index 22dc4e11a655..71b3da2c998e 100644 --- a/src/declarations/stencil-public-runtime.ts +++ b/src/declarations/stencil-public-runtime.ts @@ -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; @@ -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;