Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v4.0.0-beta.12] Angular 7 + Typescript 3.1.1 #15810

Closed
paulstelzer opened this issue Sep 29, 2018 · 3 comments
Closed

[v4.0.0-beta.12] Angular 7 + Typescript 3.1.1 #15810

paulstelzer opened this issue Sep 29, 2018 · 3 comments
Assignees

Comments

@paulstelzer
Copy link
Contributor

paulstelzer commented Sep 29, 2018

At the moment Ionic 4 isn't working with Angular 7 + Typescript 3.1.1, BUT there are just 2 issues in summary.

1. Interface 'xyz' cannot simultaneously extend types 'xyz' and 'HTMLStencilElement'. Named property 'focus' of types 'xyz' and 'HTMLStencilElement' are not identical.

xyz are HTMLIonInputElement, HTMLIonSearchbarElement, HTMLIonTextareaElement

Fix: I don't know if this is good practice, but if you remove 'focus': () => void in components.d.ts , this issue is fixed

2. Type 'Required<xyz>' does not satisfy the constraint

xyz are HTMLIonModalElement and HTMLIonPopoverElement

I think it would be a great benefit if Ionc 4 would support Angular 7 from the beginning and they are already at rc.0, so I think it would make sense :)

The complete error log:

ERROR in node_modules/@ionic/core/dist/types/components.d.ts(5625,13): error TS2320: Interface 'HTMLIonInputElement' cannot simultaneously extend types 'IonInput' and 'HTMLStencilElement'.
  Named property 'focus' of types 'IonInput' and 'HTMLStencilElement' are not identical.
node_modules/@ionic/core/dist/types/components.d.ts(5871,13): error TS2320: Interface 'HTMLIonSearchbarElement' cannot simultaneously extend types 'IonSearchbar' and 'HTMLStencilElement'.
  Named property 'focus' of types 'IonSearchbar' and 'HTMLStencilElement' are not identical.
node_modules/@ionic/core/dist/types/components.d.ts(5967,13): error TS2320: Interface 'HTMLIonTextareaElement' cannot simultaneously extend types 'IonTextarea' and 'HTMLStencilElement'.
  Named property 'focus' of types 'IonTextarea' and 'HTMLStencilElement' are not identical.
node_modules/@ionic/core/dist/types/utils/overlays-interface.d.ts(37,52): error TS2344: Type 'Required<HTMLIonModalElement>' does not satisfy the constraint 'Required<ModalOptions<ComponentRef>>'.
  Types of property 'componentProps' are incompatible.
    Type 'unknown' is not assignable to type '{ [key: string]: any; }'.
node_modules/@ionic/core/dist/types/utils/overlays-interface.d.ts(37,288): error TS2344: Type 'Required<HTMLIonPopoverElement>' does not satisfy the constraint 'Required<PopoverOptions<ComponentRef>>'.
  Types of property 'componentProps' are incompatible.
    Type 'unknown' is not assignable to type '{ [key: string]: any; }'.
@ionitron-bot ionitron-bot bot added the triage label Sep 29, 2018
@manucorporat manucorporat self-assigned this Oct 2, 2018
@ionitron-bot ionitron-bot bot removed the triage label Oct 2, 2018
@Cotspheer
Copy link

Hi there

I got the same error and I'm wondering where I can find the fix or where it was applied? Can't see any code changes or pull-requests. Would like to move on with a local temporary fix until it's released.

Thanks you in advance for any informations!

@paulstelzer
Copy link
Contributor Author

paulstelzer commented Oct 4, 2018

It's already fixed and will be available in next beta - the commit -> 5560dcd

If you can't wait (like me ;) ), just fork this repository and build core / angular and copy the folders to your project

@ionitron-bot
Copy link

ionitron-bot bot commented Nov 3, 2018

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Nov 3, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants