Skip to content

fix(types): stencil types location not updating to local file - #7051

Merged
johnjenkins merged 1 commit into
v5from
fix/v5-types-regression-7048
Nov 26, 2026
Merged

johnjenkins merged 1 commit into
v5from
fix/v5-types-regression-7048

Conversation

@johnjenkins

@johnjenkins johnjenkins commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

What is the current behavior?

Generated dist/types/components.d.ts and dist/standalone/<tag>.d.ts import HTMLStencilElement from @stencil/core/runtime. Libraries with @stencil/core as a devDependency ship types that don't resolve, so element types lose their HTMLElement members, even with skipLibCheck.

GitHub Issue Number: #7048

What is the new behavior?

  • updateStencilTypesImports now rewrites @stencil/core/runtime (it still looked for v4's @stencil/core/internal) to the copied stencil-public-runtime.
  • Standalone per-component .d.ts files import HTMLStencilElement from the stencil-public-runtime next to components.d.ts.

Documentation

N/A

Does this introduce a breaking change?

  • Yes
  • No

Testing

  • Added unit tests for updateStencilTypesImports, which had no coverage before.
  • Updated the generateCustomElementType spec to check the relative import and that the output has no @stencil/core import.
  • The new tests fail without the fix.

Other information

N/A

@johnjenkins
johnjenkins requested a review from a team as a code owner November 26, 2026 17:04
@johnjenkins
johnjenkins merged commit 2c932c1 into v5 Nov 26, 2026
31 checks passed
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

Successfully merging this pull request may close these issues.

1 participant