microsoft / microsoft/TypeScript
Option to disable decorator transform
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Go
- Sterne
- 111k
- Forks
- 14.3k
- Ø Merge
- 2 T. 4 Std.
- Gemergte PRs (30 T.)
- 132
Beschreibung
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.
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginnen Sie damit, das bestehende Verhalten bei der Transformation von Decorators und die Konventionen für Compileroptionen zu überprüfen. Prüfen Sie, wie die Ausgabe von tsc von Babel 7 und anderen Analysetools verarbeitet wird, und legen Sie anschließend das Verhalten des Flags zum Beibehalten von Decorators fest. Verifizieren Sie außerdem, dass bestehende Decorator-Implementierungen kompatibel bleiben.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- javascript, typescript
- Bereich
- compilers
- Issue-Typ
- Feature
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 25/100