microsoft / microsoft/TypeScript

"Referenced projects must have the new composite setting enabled" does not hold true

Aperta
#60,465 5 commenti 3 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Docs
Lingua principale
Go
Stelle
111k
Fork
14.3k
Merge medio
2g 4h
PR unite (30g)
132

Descrizione

🔎 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

https://vite.new/react-ts

💻 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.

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Inizia con le sezioni project references e composite del manuale di TypeScript, quindi riproduci il comportamento con i tsconfig.json, tsconfig.app.json e tsconfig.node.json indicati del template Vite React TypeScript usando npm run build. Determina se composite è necessario e documenta il comportamento risultante o il diagnostic previsto, in modo che il manuale corrisponda all’implementazione.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
typescript
Ambito
compilers, documentation
Tipo di issue
Documentazione
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.