microsoft / microsoft/TypeScript
Make Javascript intellisense detect inheritance
まだ誰も着手していません。
- 主要言語
- Go
- スター
- 111k
- フォーク
- 14.3k
- 平均マージ
- 2日 4時間
- マージ済み PR(30日)
- 132
説明
From @benjaminmillhouse on December 21, 2016 17:33
- VSCode Version: Code 1.8.0 (38746938a4ab94f2f57d9e1309c51fd6fb37553d, 2016-12-13T17:38:28.425Z)
- OS Version: Darwin x64 16.3.0
- Extensions:
| Extension | Author | Version |
|---|---|---|
| JSDocTagComplete | HookyQR | 0.0.2 |
| html-css-class-completion | Zignd | 1.0.3 |
| theme-atom-one-dark | andischerer | 0.0.1 |
| vscode-eslint | dbaeumer | 1.1.0 |
| docthis | joelday | 0.3.5 |
| Angular1 | johnpapa | 0.1.16 |
| Angular2 | johnpapa | 1.0.2 |
| csharp | ms-vscode | 1.5.3 |
| js-atom-grammar | ms-vscode | 0.1.10 |
| vscode-icons | robertohuertasm | 4.0.2 |
| bootstrap-3-snippets | wcwhitehead | 0.0.8 |
Hello,
I would love it if VS Code's Javascript intellisense was able to detect inheritance. Please let me know if there is a way to accomplish this today through jsdoc comments or anything like that. I have tried all kinds of different ways to get VS Code to detect it (definitions like below, @augments, @extends jsdoc comments, etc) and have not gotten anything to work.
As an example, when inheriting like this:
function BaseClass() {
this.foo = 'bar';
}
BaseClass.prototype.baz = function () { }
function InheritedClass() {
BaseClass.call(this);
}
InheritedClass.prototype = Object.create(BaseClass.prototype);
InheritedClass.prototype.constructor = InheritedClass;
Would like the intellisense for new InheritedClass(). to show 'foo' and 'baz' as properties/methods for InheritedClass in Intellisense.
Copied from original issue: Microsoft/vscode#17690
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
ソースファイル、テスト、エントリポイントは指定されていません。まず、VS Code で提示された BaseClass/InheritedClass の例を再現し、プロトタイプ継承を処理する JavaScript IntelliSense の経路を追跡してください。完了条件は、new InheritedClass() に対する補完候補に継承されたメンバー foo と baz が含まれることです。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- javascript, typescript
- 領域
- devtools
- issue の種類
- 機能追加
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100