microsoft / microsoft/TypeScript
Option to disable decorator transform
Nessuno ha ancora preso questa issue.
- Lingua principale
- Go
- Stelle
- 111k
- Fork
- 14.3k
- Merge medio
- 2g 4h
- PR unite (30g)
- 132
Descrizione
Search Terms
decorator output
Suggestion
Decorators are always transformed. In some cases we critically need to preserve decorators in the output to feed into other tools, such as Babel.
All the other issues around this are closed, so I can't see what the plan is here. Adding a new flag to disable decorator transformation should be forward and backward compatible with any other implementation of decorators, old or new proposal.
Use Cases
- Use Babel 7 decorator support to compile the current decorator proposal
- Feed tsc output into other analysis tools that expect decorators in JS source.
Examples
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
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia esaminando il comportamento esistente della trasformazione dei decorator e le convenzioni relative alle opzioni del compilatore. Verifica come l’output di tsc viene utilizzato da Babel 7 e da altri strumenti di analisi, quindi definisci il comportamento del flag per preservare i decorator e verifica che le implementazioni esistenti dei decorator rimangano compatibili.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- javascript, typescript
- Ambito
- 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