microsoft / microsoft/TypeScript

Add a mode to tsc that defers to a possibly-running tsc "watch mode" instance

Offen
#42,838 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

In Discussion Suggestion
Vorherrschende Sprache
Go
Sterne
111k
Forks
14.3k
Ø Merge
2 T. 4 Std.
Gemergte PRs (30 T.)
132

Beschreibung

Suggestion

Currently my projects have an npm script defined to run tsc --watch. I also have a test script configured. When working interactively, I don't want my test to wait 10s while it builds from scratch, when watch mode was running, and I just need to ask the running instance to let me know when the current generation of the source has been fully processed.

However, if I'm for some reason not running watch mode, like if someone unfamiliar with the project checks out the repo and tries to run npm test, or a CI system that has no special accommodations, it'd be useful if it went ahead and did a fresh build.

(Watch mode is great, I wish this idea was more commonplace!)

🔍 Search Terms

watch mode, incremental, npm, test

✅ Viability Checklist

My suggestion meets these guidelines:

  • This wouldn't be a breaking change in existing TypeScript/JavaScript code
  • This wouldn't change the runtime behavior of existing JavaScript code
  • This could be implemented without emitting different JS based on the types of the expressions
  • This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, new syntax sugar for JS, etc.)
  • This feature would agree with the rest of TypeScript's Design Goals.

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

Der Issue nennt keine Dateien oder Tests; beginne damit, den Einstiegspunkt für den watch-Modus von tsc und den normalen, von npm test verwendeten Build-Pfad zu lokalisieren. Ermittle, wie ein Befehl mit einer laufenden watch-Instanz kommunizieren könnte und dabei einen Fallback auf einen frischen Build beibehält; überprüfe anschließend sowohl das Verhalten bei laufendem watch als auch ohne watch.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
typescript
Bereich
build-system, cli, compilers
Issue-Typ
Feature
Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
25/100

Neue Issues direkt in Ihr Postfach

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