microsoft / microsoft/TypeScript
Recognize properties introduced by jQuery extend
まだ誰も着手していません。
- 主要言語
- Go
- スター
- 111k
- フォーク
- 14.3k
- 平均マージ
- 1日 19時間
- マージ済み PR(30日)
- 117
説明
The old VS JS language service used to make runtime types available at design-time, allowing it to support jQuery's extend function for adding properties dynamically. The new one uses static types and so does not offer these symbols during completion, navigate-to, etc. We've had some customer inquiries about the possibility of supporting this functionality in the TS language service.
https://developercommunity.visualstudio.com/content/problem/529989/aspnet-在html-文件-js-智能提示失效.html
https://developercommunity.visualstudio.com/content/problem/560277/javascript-go-to-members-doesnt-work-with-property.html
The latter provided this example:
(function ($) {
mynamespace.myClass = Class.extend({
init: function (options) {
// unless you specifically type this.testProperty = "abc" in JS, the 'Go to Members' will not find the below property even though it's explicitely defined.
},
__properties: {
'testProperty': {
/// <summary>
/// Gets or sets the test property
/// </summary>
/// <value type="String"></value>
get: function () {
return this._testProperty;
},
set: function (value) {
this._testProperty = value;
}
}
}
});
})(jQuery);
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、リンクされている2件の Developer Community レポートと jQuery/Class.extend の例を確認します。ソースファイルやテストは指定されていないため、最初に completion と navigate-to のための TypeScript language-service のエントリポイントを特定し、そのうえで動的に導入されたプロパティの認識が対象とすべき範囲と、テスト方法を定義します。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- javascript, typescript
- 領域
- devtools
- issue の種類
- 機能追加
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 25/100