microsoft / microsoft/TypeScript
"Referenced projects must have the new composite setting enabled" does not hold true
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Go
- Sterne
- 111k
- Forks
- 14.3k
- Ø Merge
- 2 T. 4 Std.
- Gemergte PRs (30 T.)
- 132
Beschreibung
🔎 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.
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne mit den Abschnitten zu project references und composite im TypeScript-Handbuch und reproduziere dann das Verhalten mit den referenzierten tsconfig.json, tsconfig.app.json und tsconfig.node.json aus dem Vite React TypeScript-Template unter Verwendung von npm run build. Kläre, ob composite erforderlich ist, und dokumentiere das resultierende Verhalten oder die erwartete diagnostic, damit das Handbuch mit der Implementierung übereinstimmt.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- typescript
- Bereich
- compilers, documentation
- Issue-Typ
- Dokumentation
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100