microsoft / microsoft/TypeScript

TSServer should expose tsconfig

Offen
#31,234 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Domain: API Needs Proposal Suggestion
Vorherrschende Sprache
Go
Sterne
111k
Forks
14.4k
Ø Merge
1 T. 19 Std.
Gemergte PRs (30 T.)
117

Beschreibung

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

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Es werden keine Dateien, Tests oder Einstiegspunkte genannt. Beginne damit, die TSServer ProjectInfo-Antwort und den Pfad zum Laden der Projektkonfiguration nachzuverfolgen, und überprüfe dann, dass die Antwort die endgültige tsconfig mit allen aufgelösten extends offenlegt und den Anwendungsfall compileOnSave unterstützt.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
typescript
Bereich
api, tooling
Issue-Typ
Feature
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
42/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.