microsoft / microsoft/TypeScript
[Feature request] allow emit param name when emitDecoratorMetadata
Aperta
Nessuno ha ancora preso questa issue.
Awaiting More Feedback
Suggestion
- Lingua principale
- Go
- Stelle
- 111k
- Fork
- 14.3k
- Merge medio
- 1g 19h
- PR unite (30g)
- 117
Descrizione
Search Terms
Suggestion
allow emit param name when emitDecoratorMetadata
Use Cases
class C1
{
@d1
m1(a: string): string
{
return null;
}
}
function d1(target: Object,
propertyKey: string,
descriptor: TypedPropertyDescriptor<any>)
{
return descriptor;
}
Examples
.js
class C1 {
m1(a) {
return null;
}
}
__decorate([
d1,
__metadata("design:type", Function),
__metadata("design:paramtypes", [String]),
__metadata("design:paramnames", ['a']),
__metadata("design:returntype", String)
], C1.prototype, "m1", null);
function d1(target, propertyKey, descriptor) {
return descriptor;
}
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 l’output richiesto di design:paramnames e il comportamento di emitDecoratorMetadata descritto nell’issue. Il payload non indica file di implementazione né test, quindi individua il punto di ingresso pertinente dell’emissione del compilatore e determina come debbano essere specificati e convalidati i metadati richiesti.
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
- Abbastanza chiara
- Idoneità per principianti
- 30/100