microsoft / microsoft/TypeScript

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

Aperta
#42,838 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

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

Descrizione

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.

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

L’issue non indica file né test; inizia individuando il punto di ingresso della modalità watch di tsc e il normale percorso di build utilizzato da npm test. Determina come un comando potrebbe comunicare con un’istanza watch in esecuzione mantenendo al contempo un fallback a una nuova build; verifica quindi sia il comportamento con watch in esecuzione sia quello senza watch.

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

Valutazione

Stack tecnologico
typescript
Ambito
build-system, cli, compilers
Tipo di issue
Funzionalità
Difficoltà
5/5
Tempo stimato
Più di una settimana
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
25/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.