microsoft / microsoft/TypeScript
JSDoc support for @memberof and @namespace
まだ誰も着手していません。
- 主要言語
- Go
- スター
- 111k
- フォーク
- 14.4k
- 平均マージ
- 1日 19時間
- マージ済み PR(30日)
- 117
説明
I work on a NodeJS Javascript codebase which uses plain JSDoc (i.e. no Typescript/Closure specific syntax). It uses require() rather than ES6/Typescript-style imports.
Our codebase has JDoc'ed code which lives under arbitrary @namespace declarations, meaning they do not correspond to actual code 'namespaces'. For example our code is JSDoc'ed as @namespace utilities but the module may be imported as utils.
My colleagues using Webstorm get the full JSDoc annotations/code completion/tooling but VSCode Intellisense does not recognised references like models.Account for e.g. parameters as shown below ...
// models.js
/** @namespace models */
/** @memberof models */
class Account {
// ...
}
module.exports = { Account }
// main.js
const { Account } = require('./models')
/**
* @return {models.Account}
*/
myMethod (account) => {
return new Account()
}
Since basically the entire codebase is namespaced, I get reduced Intellisense support for my custom code and no support for writing correct JSDocs.
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
models.js と main.js の例から始め、次に VSCode IntelliSense が require() ベースの JavaScript に対して models.Account のような JSDoc 参照をどのように解決するかを追跡します。@namespace と @memberof の宣言が任意の namespace 名で機能し、要求された参照および補完のサポートを提供できれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- javascript, node.js
- 領域
- tooling
- issue の種類
- 機能追加
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 25/100