microsoft / microsoft/TypeScript
Automatic completion, renaming, go to define based on decorator parameters
- Dominant language
- Go
- Stars
- 111k
- Forks
- 14.3k
- PR merge metrics
- PR metrics pending
Description
### 🔍 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.

### 📃 Motivating Example
This makes it easier to write when applying decorator
### 💻 Use Cases
[playground](https://www.typescriptlang.org/play/?#code/GYVwdgxgLglg9mABAEwKYTgJwIZS4gCgDcAuRbMATwBpFoAPMgYQBtsBndgWVSgAs4yACLosuLEwRRU9KAB4KNQgEpEAXgB8iAN6JgMVC2Rl2UTDDABzRAF8Nq7QFgAUC5suXoSLAQpROPEwARkJScipaBmY2TgAxAyMRDACJKRl5RVoCVU0dPQTjRFNzK1t7HQ9nd1dnCBj2RABBCudERAABNGTxTBc26VNslra2zF4QTCRdfUNCgHI52z6lmrbO-x6g5YGoELUVdS0nVpGxqAmp-NmyBZW26psgA)
Contributor guide
Research direction
Start with the linked TypeScript Playground example and reproduce the decorator-parameter scenario there. Trace how the language service currently handles completion, rename, and go-to-definition when the function return type is omitted; done means all three operations work for the decorator parameter without changing emitted JavaScript.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, typescript
- Domain
- developer-experience
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100