microsoft / microsoft/TypeScript

Automatic completion, renaming, go to define based on decorator parameters

Aperta
#61,931 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Awaiting More Feedback Suggestion
Lingua principale
Go
Stelle
111k
Fork
14.3k
Merge medio
2g 4h
PR unite (30g)
132

Descrizione

### 🔍 Search Terms

language server, decorator, auto completions

### ✅ Viability Checklist

- [x] This wouldn't be a breaking change in existing TypeScript/JavaScript code
- [x] This wouldn't change the runtime behavior of existing JavaScript code
- [x] This could be implemented without emitting different JS based on the types of the expressions
- [x] This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, new syntax sugar for JS, etc.)
- [x] This isn't a request to add a new utility type: https://github.com/microsoft/TypeScript/wiki/No-New-Utility-Types
- [x] This feature would agree with the rest of our Design Goals: https://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals

### ⭐ Suggestion

In the following example, when no function return type is specified, the decorator parameter type should be automatically completed, renamed, and go to define.

![Image](https://github.com/user-attachments/assets/4a382666-3854-4f3f-ac6a-6d9494223f1b)

### 📃 Motivating Example

This makes it easier to write when applying decorator

### 💻 Use Cases

[playground](https://www.typescriptlang.org/play/?#code/GYVwdgxgLglg9mABAEwKYTgJwIZS4gCgDcAuRbMATwBpFoAPMgYQBtsBndgWVSgAs4yACLosuLEwRRU9KAB4KNQgEpEAXgB8iAN6JgMVC2Rl2UTDDABzRAF8Nq7QFgAUC5suXoSLAQpROPEwARkJScipaBmY2TgAxAyMRDACJKRl5RVoCVU0dPQTjRFNzK1t7HQ9nd1dnCBj2RABBCudERAABNGTxTBc26VNslra2zF4QTCRdfUNCgHI52z6lmrbO-x6g5YGoELUVdS0nVpGxqAmp-NmyBZW26psgA)

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Inizia con l'esempio TypeScript Playground collegato e riproduci lì lo scenario del parametro del decorator. Traccia il modo in cui il servizio linguistico gestisce attualmente completion, rename e go-to-definition quando il tipo restituito dalla funzione è omesso; il lavoro è completato quando tutte e tre le operazioni funzionano per il parametro del decorator senza modificare il JavaScript emesso.

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

Valutazione

Stack tecnologico
javascript, typescript
Ambito
developer-experience
Tipo di issue
Funzionalità
Difficoltà
5/5
Tempo stimato
Più di una settimana
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.