microsoft / microsoft/TypeScript

[JavaScript/TypeScript Language Hints] Hide default `Function` properties/methods until manually typed just like in Rust.

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

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

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

説明

Right now if I create a class with static methods/properties or via namespace, it's very hard to distinguish between default and custom ones visually.

Image

I propose to hide those **default** methods, they are not useful to know for beginners, while for experienced ones, it's noisy. Leaving only defined in classes/namespaces.
I'm looking from Rust lang analyzer extension perspective, which does exactly that, and I feel like it's much more convenient, especially if there will be more properties/methods in future.
If the property is fully typed correctly, e.g. `Test.call`, the hint will appear just like typing `Test.constructor`, it's not appearing, but when typed - the hint appears with `Function`.

This can be an option to enable/disable.

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

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

はじめの一歩

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

調査の方向性

まず、issue に記載されているクラスと namespace の補完例を再現し、現在の TypeScript の言語ヒントと Rust analyzer の動作を比較します。Function のデフォルトメンバーが明示的に型指定されるまで非表示になり、カスタムメンバーは表示されたままで、 有効化/無効化オプションが考慮されれば完了です。

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

評価

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

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

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