microsoft / microsoft/TypeScript

watch additional files

Aperta
#41,224 2 commenti 4 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

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

Descrizione

Search Terms

tsc watch yarn.lock

Suggestion

add the ability to watch files that are not part of the default set

Use Cases

primary use case for this is to auto restart language server, or a tsc --watch if yarn.lock changes when using pnp since there is no node_modules to watch. currently if a library is removed tsc will actually crash when it goes missing. When a library is added tsc watch needs to be manually restarted.

Examples

I think these should be additive, not replace the existing paths, however I can see adding a new option for additivity, or requiring this to replace existing options. If it replaces the current watch set then it should be well documented how to specify them. If no arguments are provided the behavior of suggested would be use the defaults.

tsc --watch yarn.lock

"compilerOptions": {
    "watch": {
      "paths": ["yarn.lock"],
    },
}

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, 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

Inizia esaminando l'entry point di tsc --watch e la gestione predefinita esistente del file watching. L'issue propone forme per la riga di comando e compilerOptions, ma lascia irrisolte la loro interazione e additività; per completarla sarebbero necessari un'interfaccia definita, l'implementazione, la documentazione e la copertura dei test per il watching delle modifiche a yarn.lock.

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

Valutazione

Stack tecnologico
typescript
Ambito
build-system
Tipo di issue
Funzionalità
Difficoltà
5/5
Tempo stimato
Più di una settimana
Stato di attività
Ferma
Chiarezza
Da chiarire
Idoneità per principianti
30/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.