bug: TS2320: Interface 'HTMLIonInputElement' cannot simultaneously extend types 'IonInput' and 'HTMLStencilElement'

Đang mở
#30,650 16 bình luận 29 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
52/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Ít trao đổi
Công nghệ
angular, typescript
Lĩnh vực
frontend

Hướng nghiên cứu

Bắt đầu bằng cách tái hiện sự cố với Angular 20.2.0, TypeScript 5.9.2 và npx ng serve. Kiểm tra các khai báo quanh dòng 4326 và 4888 trong node_modules/@ionic/core/dist/types/components.d.ts, nơi xảy ra các xung đột interface được báo cáo. Được xem là hoàn tất khi dự án build và serve mà không có các lỗi TS2320.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

stencil type: bug
Prerequisites
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...

and my project went well with [email protected].* and [email protected].*

Expected Behavior

Success to build and serve

Steps to Reproduce
  1. update deps with [email protected] and [email protected]
  2. try to serve with npx ng serve
Ionic Info

Ionic:

Ionic CLI : 7.2.1 (C:\Users\USER\AppData\Local\npm-cache_npx\f6fddb685269761d\node_modules@ionic\cli)
Ionic Framework : @ionic/angular 8.7.2
@angular-devkit/build-angular : not installed
@angular-devkit/schematics : 20.2.0
@angular/cli : 20.2.0
@ionic/angular-toolkit : not installed

Capacitor:

Capacitor CLI : 7.4.2
@capacitor/android : 7.4.2
@capacitor/core : 7.4.2
@capacitor/ios : not installed

Utility:

cordova-res : not installed globally
native-run : 2.0.1

System:

NodeJS : v24.6.0 (C:\Program Files\nodejs\node.exe)
npm : 11.5.2
OS : Windows 10


Sorry for my poor English 😆

Ngôn ngữ chính
TypeScript
Star
52.8k
Fork
13.3k
Merge trung bình
3 ngày 1 giờ
Pull request đã merge (30 ngày)
86

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của ionic-team/ionic-framework

Tất cả issue của ionic-team/ionic-framework

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.