You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched for existing issues that already report this problem, without success.
Ionic Framework Version
v8.x
Current Behavior
since angular 20.2.0 released recently and typescript v5.9 is being supported
I upgraded dependencies of my project and the message pop up when serving the project
X [ERROR] TS2320: Interface 'HTMLIonInputElement' cannot simultaneously extend types 'IonInput' and 'HTMLStencilElement'.
Named property 'autocorrect' of types 'IonInput' and 'HTMLStencilElement' are not identical. [plugin angular-compiler]
node_modules/@ionic/core/dist/types/components.d.ts:4326:14:
4326 │ interface HTMLIonInputElement extends Components.IonInput, H...
X [ERROR] TS2320: Interface 'HTMLIonSearchbarElement' cannot simultaneously extend types 'IonSearchbar' and 'HTMLStencilElement'.
Named property 'autocorrect' of types 'IonSearchbar' and 'HTMLStencilElement' are not identical. [plugin angular-compiler]
node_modules/@ionic/core/dist/types/components.d.ts:4888:14:
4888 │ interface HTMLIonSearchbarElement extends Components.IonSear...
Reacted by Bryson Reese, Yizhou Qiu, Manuel Conde Vendrell, snolan-ethika, Procisz (Zajkás Ágoston), pisxid, Aleksandar Randjelovic, Dennis Ameling and developer@xbranch
Angular is currently the only framework that doesn't use skipLibCheck in its tsconfig.json in both our starters and our docs examples. React and Vue are not running into this because their configs already include skipLibCheck. I'll be updating the Angular starters and docs to include this as well.
What we are doing to fix it
The permanent fix needs to happen in Stencil. We've created an internal task to upgrade Stencil for TypeScript 5.9 support. We don't have an ETA until work begins, but once complete, we'll update Stencil in Ionic Framework and resolve this issue.
What we recommend in the meantime
If you want to use TypeScript 5.9, add the following to your tsconfig.json:
"compilerOptions": {
"skipLibCheck": true,
},
If you want to pin TypeScript to the last version that works, you can install it with:
We will update this issue once there is a permanent fix. Thank you!
Reacted by Eduardo, Gonçalo M., Diego Bonura, Russ Carver, Steve Tapley, Masahiko Sakakibara, Jean-Matthieu BARBIER, Sven Budak, crdev, Florian Sojer and 5 more
Reacted by snolan-ethika, Sven Budak, crdev, Weston Cox, Manuel Conde Vendrell and Dennis Ameling
We tried to resolve this after upgrading Stencil to TypeScript 5.9 by overriding the autocorrect type. When that introduced issues, we tried only omitting the autocorrect type instead. Unfortunately, both approaches caused issues for other Stencil projects and we had to revert the upgrade entirely.
At this point, the likely path forward is to update Ionic Framework's autocorrect type in Input and Searchbar to use a boolean. This will be a breaking change so we can't do this until Ionic Framework v9. However, we are actively working on v9 and the latest TypeScript support is still a top priority.
Reacted by Tomas Rimkus, Weston Cox, Jean-Matthieu BARBIER, Dennis Ameling, Sergio Navarro, Ahmad Almunajjed and missma19
I worked around this issue by overwriting the files for now:
// stencil-fix.d.ts
import '@ionic/core'; // Ensures the global Ionic/Stencil types are loaded first
/**
* ⚠️ TEMPORARY FIX FOR IONIC / STENCIL COMPILER CLASH (TS2320)
*
* Tracking Issue: https://github.com/ionic-team/ionic-framework/issues/30650
*
* Context:
* The Angular esbuild compiler plugin actively checks template files and
* bypasses the standard `skipLibCheck: true` flag in tsconfig. This exposes
* a multiple-inheritance conflict in Ionic's internal types:
* - Parent 1 (`HTMLStencilElement`) types `autocorrect` as `string`.
* - Parent 2 (`IonInput` / `IonSearchbar`) types it strictly as `'on' | 'off'`.
*
* Why this specific fix:
* We cannot use `string` or `'on' | 'off'` here because TypeScript refuses to let a
* child broaden or violate conflicting parent rules. By setting `autocorrect: any`
* directly on the child interfaces, `any` acts as a universal adapter that satisfies
* both parents simultaneously.
*
* This surgical approach is preferred because it silences the compilation error
* without resorting to wiping out strict typing for the entire `<ion-input>` JSX element.
*/
declare global {
// This explicitly targets ONLY the conflicting property on the specific elements.
// All other properties (value, disabled, type, etc.) remain 100% strictly typed!
interface HTMLIonInputElement {
autocorrect: any;
}
interface HTMLIonSearchbarElement {
autocorrect: any;
}
}
Activity
IAM5K commentedon Aug 23, 2025
Facing same issue in new app.
{ "dependencies": { "@angular/animations": "^20.0.0", "@angular/common": "^20.0.0", "@angular/compiler": "^20.0.0", "@angular/core": "^20.0.0", "@angular/forms": "^20.0.0", "@angular/platform-browser": "^20.0.0", "@angular/platform-browser-dynamic": "^20.0.0", "@angular/router": "^20.0.0", "@angular/service-worker": "^20.0.0", "@capacitor/android": "7.4.3", "@capacitor/app": "7.0.2", "@capacitor/core": "7.4.3", "@capacitor/haptics": "7.0.2", "@capacitor/ios": "7.4.3", "@capacitor/keyboard": "7.0.2", "@capacitor/status-bar": "7.0.2", "@ionic/angular": "^8.0.0", "firebase-tools": "^14.14.0", "ionicons": "^7.0.0", "rxjs": "~7.8.0", "tslib": "^2.3.0", "zone.js": "~0.15.0" }, "devDependencies": { "@angular-devkit/build-angular": "^20.0.0", "@angular-eslint/builder": "^20.0.0", "@angular-eslint/eslint-plugin": "^20.0.0", "@angular-eslint/eslint-plugin-template": "^20.0.0", "@angular-eslint/schematics": "^20.0.0", "@angular-eslint/template-parser": "^20.0.0", "@angular/cli": "^20.0.0", "@angular/compiler-cli": "^20.0.0", "@angular/language-service": "^20.0.0", "@capacitor/cli": "7.4.3", "@ionic/angular-toolkit": "^12.0.0", "@types/jasmine": "~5.1.0", "@typescript-eslint/eslint-plugin": "^8.18.0", "@typescript-eslint/parser": "^8.18.0", "eslint": "^9.16.0", "eslint-plugin-import": "^2.29.1", "eslint-plugin-jsdoc": "^48.2.1", "eslint-plugin-prefer-arrow": "1.2.3", "jasmine-core": "5.9.0", "jasmine-spec-reporter": "~5.0.0", "karma": "~6.4.0", "karma-chrome-launcher": "~3.2.0", "karma-coverage": "~2.2.0", "karma-jasmine": "~5.1.0", "karma-jasmine-html-reporter": "~2.1.0", "typescript": "5.9.2" }, }Hope we get fix soon.
Message for the testing team, atleast test once before release.
loganmurray-infor commentedon Aug 25, 2025
FYI you can force a build by adding
"skipLibCheck": trueto your tsconfig.json'scompilerOptions, but also hoping this gets resolved soon.pedrodominguesp commentedon Aug 25, 2025
Facing same issue in new app
davidsarkany commentedon Aug 26, 2025
You need to add
"skipLibCheck": trueloganmurray-infor commentedon Aug 26, 2025
Whoops, corrected.
brandyscarney commentedon Aug 28, 2025
Thanks for the issue!
You should be able to work around this by downgrading TypeScript:
brysonreese commentedon Aug 28, 2025
Confirmed downgrade to [email protected] worked in my case. Thank you much!
SoraNoIseki commentedon Sep 3, 2025
This fixed the issue for me, works fine with [email protected] too. Thanks!
brandyscarney commentedon Sep 4, 2025
Hi everyone! I wanted to share an update on why this issue is happening, what needs to be done to resolve it, and what we recommend in the meantime.
Why this is happening
TypeScript 5.9 introduced a new property,
HTMLElement.autocorrect, defined as aboolean. This conflicts with Stencil's existingautocorrecttype, which follows the globalautocorrectand is defined as astring.Why this only affects Angular (not React or Vue)
Angular is currently the only framework that doesn't use
skipLibCheckin itstsconfig.jsonin both our starters and our docs examples. React and Vue are not running into this because their configs already include skipLibCheck. I'll be updating the Angular starters and docs to include this as well.What we are doing to fix it
The permanent fix needs to happen in Stencil. We've created an internal task to upgrade Stencil for TypeScript 5.9 support. We don't have an ETA until work begins, but once complete, we'll update Stencil in Ionic Framework and resolve this issue.
What we recommend in the meantime
If you want to use TypeScript 5.9, add the following to your
tsconfig.json:If you want to pin TypeScript to the last version that works, you can install it with:
We will update this issue once there is a permanent fix. Thank you!
chore(): npm i [email protected] --save-exact
snolan-ethika commentedon Sep 10, 2025
cool, but what happens when there are actual issues with declaration files? Does this hide all issues?
lecousin commentedon Nov 14, 2025
looks like Stencil fixed it and upgraded to typescript 5.9
hakimio commentedon Nov 14, 2025
And the TS update was reverted because of Ionic: stenciljs/core#6444
brandyscarney commentedon Nov 14, 2025
Small update -
We tried to resolve this after upgrading Stencil to TypeScript 5.9 by overriding the autocorrect type. When that introduced issues, we tried only omitting the autocorrect type instead. Unfortunately, both approaches caused issues for other Stencil projects and we had to revert the upgrade entirely.
At this point, the likely path forward is to update Ionic Framework's
autocorrecttype in Input and Searchbar to use aboolean. This will be a breaking change so we can't do this until Ionic Framework v9. However, we are actively working on v9 and the latest TypeScript support is still a top priority.Update to Angular 21
Update to Angular 21
upgrade lazer_app to Angular 20
upgrade lazer_app to Angular 20
andreElrico commentedon May 18, 2026
I worked around this issue by overwriting the files for now:
// stencil-fix.d.ts
make sure to
includein tsconfig.IAM5K commentedon May 22, 2026
Wokarounds only help in local, it often creates issue with the procuction ci cd pipeline
hakimio commentedon May 22, 2026
@IAM5K at least
bunandpnpmpackage managers havepatchcommand to patch 3rd party dependencies.thetaPC commentedon Nov 26, 2026
Thanks for the report, and sorry for the delay.
Verified on 9.0.13. #31185 fixed it in v9.0.0, so updating to 9.0.0 or later resolves it.