microsoft / microsoft/TypeScript

Recognize properties introduced by jQuery extend

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

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

Awaiting More Feedback Suggestion
主要言語
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);

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

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

はじめの一歩

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

調査の方向性

まず、リンクされている2件の Developer Community レポートと jQuery/Class.extend の例を確認します。ソースファイルやテストは指定されていないため、最初に completion と navigate-to のための TypeScript language-service のエントリポイントを特定し、そのうえで動的に導入されたプロパティの認識が対象とすべき範囲と、テスト方法を定義します。

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

評価

技術スタック
javascript, typescript
領域
devtools
issue の種類
機能追加
難易度
5/5
見積もり時間
1週間以上
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
25/100

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

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