bug: re-open of issue #2769 / components.d.ts missing types
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- typescript
- Domain
- build-system
Research direction
Start by comparing the first and second builds described in the issue, using src/components.d.ts, dist/types/components.d.ts, and dist/types/components as the observable outputs. Review the related behavior in issue #2769, then reproduce with the listed npm init stencil steps; done means the first build includes all component types and has no broken import.
Written by the indexing model from the issue text.
Description
Stencil version:
@stencil/core@2.13.0
Current behavior:
The behaviour is best documented in the closed ticket (by bot due to inactivity) the Issue remains un-solved - please have a look at https://github.com/ionic-team/stencil/issues/2769
Copycat:
If there is no src/components.d.ts file present, and one component (A) references another's type (B)...
On first build, the types are not generated for (A) in the output directory dist/types/components. If (A) exports any types, this can also result in broken imports in dist/types/components.d.ts. No error is reported during build.
On second build (where there is now a src/components.d.ts present as a result of the first build), the types are generated for (A) in the output directory dist/types/components.
I do not like committing auto-generated files to source control, as they result in needless churn, hence why i do not have src/components.d.ts (this was a fresh clone of my repo).
Expected behavior:
All Types are present in the first compile of components.d.ts, when no components.d.ts is present in the first place.
Copycat:
Ideally it should Just Work(tm), and not rely on committing auto-generated files to source control. On both the first (broken) build and the second (successful) build, the src/components.d.ts file is exactly the same, so it may be a timing/ordering issue?
An alternative would simply be to raise an error in this case.
Steps to reproduce:
- create new stencil project with npm init stencil
- rm src/components.d.ts
- add the components from the Related code section below
- npm run build
- open dist/types/components.d.ts and see a broken import
- ls dist/types/components/ and notice there are no types for my-other-component
Related code:
please have a look at https://github.com/ionic-team/stencil/issues/2769
- Dominant language
- TypeScript
- Stars
- 13.1k
- Forks
- 855
- Avg merge
- 4h 7m
- Merged PRs (30d)
- 44
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from stenciljs/core
-
Stencil v5
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Stencil v5
Difficulty 4/5 3-5 days Newbie friendliness 55/100
-
Bug: Validated Stencil v5
Difficulty 4/5 3-5 days Newbie friendliness 48/100
-
Feature: Want this? Upvote it!
Difficulty 5/5 Over a week Newbie friendliness 25/100
-
Feature: Want this? Upvote it!
Difficulty 4/5 3-5 days Newbie friendliness 48/100
Similar issues
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster no-stale P3
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficulty 1/5 Under an hour Newbie friendliness 76/100
-
code-quality refactoring
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
github/gh-aw-firewall#8816 ·
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
langchain-ai/deepagents#6450 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
vercel/react-tweet#225 ·