microsoft / microsoft/TypeScript
Automatic completion, renaming, go to define based on decorator parameters
- Ngôn ngữ chính
- Go
- Star
- 111k
- Fork
- 14.3k
- Merge trung bình
- 2 ngày 4 giờ
- Pull request đã merge (30 ngày)
- 132
Mô tả
### 🔍 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)
Hướng dẫn đóng góp
Hướng nghiên cứu
Bắt đầu với ví dụ TypeScript Playground được liên kết và tái hiện kịch bản tham số decorator ở đó. Theo dõi cách language service hiện xử lý completion, rename và go-to-definition khi kiểu trả về của hàm bị bỏ qua; hoàn thành có nghĩa là cả ba thao tác đều hoạt động đối với tham số decorator mà không thay đổi JavaScript được phát ra.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- javascript, typescript
- Lĩnh vực
- developer-experience
- Loại issue
- Tính năng
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 35/100