microsoft / microsoft/TypeScript

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

オープン
#61,931 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

Awaiting More Feedback Suggestion
主要言語
Go
スター
111k
フォーク
14.3k
平均マージ
2日 4時間
マージ済み PR(30日)
132

説明

### 🔍 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)

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

リンクされた TypeScript Playground の例から始め、そこで decorator parameter のシナリオを再現してください。関数の戻り値の型が省略されている場合に、language service が現在 completion、rename、go-to-definition をどのように処理しているかを追跡してください。decorator parameter に対して3つすべての操作が、生成される JavaScript を変更せずに機能すれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
javascript, typescript
領域
developer-experience
issue の種類
機能追加
難易度
5/5
見積もり時間
1週間以上
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。