microsoft / microsoft/TypeScript
JSDoc @name tag does not function
オープン
まだ誰も着手していません。
Awaiting More Feedback
Suggestion
- 主要言語
- Go
- スター
- 111k
- フォーク
- 14.3k
- 平均マージ
- 2日 4時間
- マージ済み PR(30日)
- 132
説明
- VSCode Version: 1.33.1
- OS Version: Windows 7 x86_64 (but I do not think that is relevant)
- Does this issue occur when all extensions are disabled?:
Yes
Steps to Reproduce:
- Write in a file with
.jsor.tsextension the below sample code:
/**
Construct a new component
@class Component
@classdesc A generic component
@param {Object} options - Options to initialize the component with
@param {String} options.name - This component's name, sets {@link Component#lastProperty}
@param {Boolean} options.visible - Whether this component is vislble, sets {@link Component#firstProperty}
*/
function Component(options) {
/**
Whether this component is visible or not
@name Component#firstProperty
@type Boolean
@default false
*/
this.firstProperty = options.visible;
/**
This component's name
@name Component#lastProperty
@type String
@default "Component"
@readonly
*/
Object.defineProperty(this, 'lastProperty', {
value: options.name || 'Component',
writable: false
});
}
const myComponent = new Component({});
- on a new line at the end of the document type
myComponentwith a dot at its end. - While the text-cursor is after the dot, press
Ctrl+Spaceto open the auto-completion list.
Current Behavior:
When you chose .js as file extension, only firstProperty is in the auto-completion list (with its type comment and so on).
But when you have it in a file with .ts extension, none of firstProperty and lastProperty will be detected, and JSDoc seems useless.
Expected Behavior:
Both firstProperty and lastProperty should be detected and get placed in the auto-completion list, and that no matter which of .js or .ts file extensions we are using.
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
指定された Component の例を .js ファイルと .ts ファイルの両方で再現し、その後 myComponent. の後の補完の動作を確認します。それぞれのファイル形式で、JSDoc によって定義されたどのプロパティが検出されるかを比較します。完了条件は、両方の拡張子の補完リストに firstProperty と lastProperty の両方が表示されることです。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- javascript, typescript
- 領域
- devtools
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- 明確に書かれている
- 初心者へのやさしさ
- 35/100