microsoft / microsoft/TypeScript

TSServer should expose tsconfig

Aperta
#31,234 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Domain: API Needs Proposal Suggestion
Lingua principale
Go
Stelle
111k
Fork
14.3k
Merge medio
1g 19h
PR unite (30g)
117

Descrizione

Search Terms

TSServer TSconfig ProjectInfo

Suggestion

export interface ProjectInfo {
  configFileName: string;
  fileNames?: string[];
  languageServiceDisabled?: boolean;
 }

TSServer should also include the project config (the final form of tsconfig.json with all the extends resolved) in the ProjectInfo response

Use Cases

Currently, the editor is expected to send compileOnSaveEmitFile command on each save if compileOnSave flag is set. To figure that out, the editor has to parse the tsconfig.json file and check if the flag is set. The initial version of extend was relatively easy to implement. But now with the support for package name, it's complex to implement correctly.

Why can't you use tsc --showConfig?

Currently we bundle the tsserver.js file along the plugin. So the only dependency is nodejs. This also makes it easier to use it in js projects which don't have typescript dependency. If we depend on tsc, we would also have to bundle tsc file etc.

see https://github.com/ananthakumaran/tide/issues/310

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

Non vengono indicati file, test o punti di ingresso. Inizia tracciando la risposta ProjectInfo di TSServer e il percorso di caricamento della configurazione del progetto, quindi verifica che la risposta esponga il tsconfig finale con tutti gli extends risolti e supporti il caso d’uso compileOnSave.

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

Valutazione

Stack tecnologico
typescript
Ambito
api, tooling
Tipo di issue
Funzionalità
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
42/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.