microsoft / microsoft/TypeScript
"Referenced projects must have the new composite setting enabled" does not hold true
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 111k
- Forks
- 14.3k
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 132
Description
🔎 Search Terms
composite, project references, solution-style tsconfig
🕗 Version & Regression Information
- This is the behavior in every version I tried, and I reviewed the FAQ for entries about tsconfig.
⏯ Playground Link
💻 Code
The above link is a project created from the vite react-ts template (https://vite.new/react-ts).
It uses project references in tsconfig.json, but no composite: true specified in both tsconfig.app.json and tsconfig.node.json.
On the other hand, the TypeScript handbook says:
Referenced projects must have the new composite setting enabled.
🙁 Actual behavior
The project builds (npm run build) successfully without composite: true.
🙂 Expected behavior
If I understand correctly, the documentation means I have to specify composite: true when using references. I'd expect an error or warning if I didn't follow the guide.
Additional information about the issue
I'm curious whether it's a bug or a feature.
If it's a bug, what's the expected behavior?
If it's a feature, I'd like to see the documentation updated accordingly.
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.
Research direction
Start with the project references and composite section in the TypeScript handbook, then reproduce the behavior with the referenced tsconfig.json, tsconfig.app.json, and tsconfig.node.json from the Vite React TypeScript template using npm run build. Resolve whether composite is required and document the resulting behavior or expected diagnostic so the handbook matches the implementation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- compilers, documentation
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100