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

App with stencil-router doesn't compile in Stencil 2.14+ because of TypeScript 4.5 #131

Open
cmaas opened this issue Apr 12, 2022 · 5 comments

Comments

@cmaas
Copy link

cmaas commented Apr 12, 2022

Stencil version: 2.14 or higher

└── @stencil/[email protected]

I'm submitting a ... (check one with "x")
[x] bug report
[ ] feature request
[ ] support request => Please do not submit support requests here, use one of these channels: https://forum.ionicframework.com/ or https://stencil-worldwide.slack.com

Current behavior:

> stencil build

[15:45.9]  @stencil/core
[15:46.1]  v2.14.0 💫
[15:46.4]  build, app, prod mode, started ...
[15:46.4]  transpile started ...
[15:46.7]  transpile finished in 369 ms

[ ERROR ]  TypeScript: ./node_modules/@stencil/core/compiler/lib.dom.d.ts:4482:101
           Type 'HTMLElementTagNameMap[K]' does not satisfy the constraint 'Element'.Type 'HTMLElement |
           HTMLAppHomeElement | HTMLAppProfileElement | HTMLAppRootElement | HTMLAnchorElement | ... 74 more ... |
           HTMLTemplateElement' is not assignable to type 'Element'.Type 'HTMLStencilRouteLinkElement' is not
           assignable to type 'Element'.Property 'ariaLabel' is optional in type 'HTMLStencilRouteLinkElement' but
           required in type 'Element'.

   L4481:   */
   L4482:  TagName<K extends keyof HTMLElementTagNameMap>(qualifiedName: K): HTMLCollectionOf<HTMLElementTagNameMap[K]>;
   L4483:  getElementsByTagName<K extends keyof SVGElementTagNameMap>(qualifiedName: K): HTMLCollectionOf<SVGElementTagNameMap[K]>;

[ ERROR ]  TypeScript: ./node_modules/@stencil/core/compiler/lib.dom.d.ts:4770:101
           Type 'HTMLElementTagNameMap[K]' does not satisfy the constraint 'Element'.Type 'HTMLElement |
           HTMLAppHomeElement | HTMLAppProfileElement | HTMLAppRootElement | HTMLAnchorElement | ... 74 more ... |
           HTMLTemplateElement' is not assignable to type 'Element'.

   L4769:  getElementsByClassName(classNames: string): HTMLCollectionOf<Element>;
   L4770:  TagName<K extends keyof HTMLElementTagNameMap>(qualifiedName: K): HTMLCollectionOf<HTMLElementTagNameMap[K]>;
   L4771:  getElementsByTagName<K extends keyof SVGElementTagNameMap>(qualifiedName: K): HTMLCollectionOf<SVGElementTagNameMap[K]>;

[ ERROR ]  TypeScript: ./node_modules/@stencil/router/dist/types/components.d.ts:105:13
           Interface 'HTMLStencilRouteLinkElement' cannot simultaneously extend types 'StencilRouteLink' and
           'HTMLStencilElement'.Named property 'ariaLabel' of types 'StencilRouteLink' and 'HTMLStencilElement' are not
           identical.

    L105:    interface HTMLStencilRouteLinkElement extends Components.StencilRouteLink, HTMLStencilElement {}
    L106:    var HTMLStencilRouteLinkElement: {

[15:46.7]  build failed in 377 ms

Expected behavior:
Should compile, like with Stencil 2.13.0

Steps to reproduce:
Create a new Stencil starter 'app'. This has Stencil 2.13.0 as a dependency. Update to Stencil 2.14.0 or higher. Compile.

Related code:
Presumably the same problem as with Ionicions / aria attributes: ionic-team/ionicons#1011

Other information:
No

@cmaas cmaas changed the title stencil-router doesn't compile in Stencil 2.14+ because of TypeScript 4.5 App with stencil-router doesn't compile in Stencil 2.14+ because of TypeScript 4.5 Apr 12, 2022
@dario-baumberger
Copy link

I have the same issue with @stencil/core 2.15.0

@selodev
Copy link

selodev commented Apr 17, 2022

I have the same issue with @stencil/core 2.15.0

same here

@leegee
Copy link

leegee commented May 9, 2022

Same problem. Is this package being maintained?

@nazmulpro
Copy link

Same problem :(

@luckybusted
Copy link

In a different context but the same issue. Isn't it possible to change the TS version?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants