microsoft / microsoft/TypeScript

Include documentation from a variable's type when you hover the variable

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

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

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

説明

Issue Type: Feature request

I had hoped to see the description for the type when hovering over the value via intellisense, etc.

When I hover over context.slot I can see "The slot the disk is in." yet when I try hovering over const slot I see just the type. Is there anything to enable this? Even setting slot to Slot manually it still only shows the type.

 /** The slot the disk is in. */
type Slot = string;

interface Context {
    /** The slot the disk is in. */
    slot?: Slot
}

const func = (context: Context): Context => {
    const x = context.slot;
    const slot: Slot = context.slot;

    return {
        slot: x || slot
    };
};

func({
    slot: '1'
}).slot;

VS Code version: Code 1.43.2 (0ba0ca52957102ca3527cf479571617f0de6ed50, 2020-03-24T07:34:57.037Z)
OS version: Darwin x64 19.2.0

System Info
Item Value
CPUs Intel(R) Core(TM) i5 CPU M 520 @ 2.40GHz (4 x 2400)
GPU Status 2d_canvas: unavailable_software
flash_3d: disabled_software
flash_stage3d: disabled_software
flash_stage3d_baseline: disabled_software
gpu_compositing: disabled_software
metal: disabled_off
multiple_raster_threads: enabled_on
oop_rasterization: disabled_off
protected_video_decode: disabled_off
rasterization: disabled_software
skia_renderer: disabled_off_ok
video_decode: disabled_software
viz_display_compositor: enabled_on
viz_hit_test_surface_layer: disabled_off_ok
webgl: unavailable_software
webgl2: unavailable_software
Load (avg) 1, 1, 2
Memory (System) 8.00GB (0.79GB free)
Process Argv .
Screen Reader no
VM 0%
Extensions (27)
Extension Author (truncated) Version
go-outliner 766 0.1.20
npm-intellisense chr 1.3.0
path-intellisense chr 1.4.2
jsrefactor cms 2.20.5
vue-peek dar 1.0.2
vscode-eslint dba 2.1.2
EditorConfig Edi 0.14.5
vscode-npm-script eg2 0.3.11
flow-for-vscode flo 1.5.0
todo-tree Gru 0.0.171
docthis joe 0.7.1
vscode-home-assistant kee 1.6.1
dotenv mik 1.0.1
vscode-docker ms- 1.0.0
csharp ms- 1.21.16
atom-keybindings ms- 3.0.6
cpptools ms- 0.27.0
Go ms- 0.13.1
vscode-typescript-next ms- 3.9.20200408
go-doc msy 0.1.1
hide-gitignored npx 1.1.0
vetur oct 0.24.0
vscode-graphql Pri 0.2.14
json-template sto 0.3.1
vscode-icons vsc 10.0.0
vscode-wakatime Wak 4.0.0
vscode-go-autotest win 1.6.0

(2 theme extensions excluded)

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

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

はじめの一歩

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

調査の方向性

まず、issue の TypeScript の例で hover の動作を再現し、VS Code で使用されている TypeScript language-service の hover パスを調査します。型がエイリアスを参照している変数について、ドキュメントがどのように選択されるかを確認し、そのうえで、既存のプロパティの hover 動作を変更せずに、hover に型のドキュメントが含まれることを検証します。

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

評価

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

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

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