microsoft / microsoft/TypeScript

Cache Declarations Directory

Aperta
#60,905 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

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

Descrizione

🔍 Search Terms

cache declarations cached tsserver tsc

✅ Viability Checklist
⭐ Suggestion

A cache directory for declaration files that can be used both for normal type declaration and for tsserver.

This would be a shared folder to use for type definitions in development and possibly for build steps.

A separate folder could mean you have one service that could have it's own optimizations running in parallel or for some part of the project and emitting the declaration files, while the rest is worked normally or even tsserver rely only those declarations.

📃 Motivating Example

https://github.com/trpc/trpc/discussions/2448#discussioncomment-11151754

💻 Use Cases

With tools that relies heavily on TS, some projects see inference times of seconds and have to rely on splitting code into a monorepo or some indirect compilation step and then depending on those types.

  1. What do you want to use this for?

Faster inference in large projects with tooling with complex, nested types.

  1. What shortcomings exist with current approaches?

Some relies on splitting code into a monorepo, others you need multiple tsconfigs so you can generate the types in one place and then reference them in the actual code, making indirections on the type system to keep the inference speed.

  1. What workarounds are you using in the meantime?

Have a parallel config to generate types and change a critical entrypoint to use the generated types instead of the normally inferred one.

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 la proposta, i casi d’uso e la discussione trpc collegata per chiarire il comportamento richiesto di declaration-cache. Il lavoro sarebbe completato quando fosse definita una directory di cache condivisa che supporti il normale utilizzo delle dichiarazioni, tsserver ed eventualmente i passaggi di build, con l’ambito e i punti di integrazione specificati.

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

Valutazione

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

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.