microsoft / microsoft/TypeScript
JSDoc optional/required variant doesn't play well with multi-@param RecordType declarations
オープン
まだ誰も着手していません。
Bug
Domain: JavaScript
Domain: JSDoc
- 主要言語
- Go
- スター
- 111k
- フォーク
- 14.3k
- 平均マージ
- 2日 4時間
- マージ済み PR(30日)
- 132
説明
TypeScript Version: 2.9.0-dev.20180330
Search Terms: as mentioned in this comment, I'm opening this issue because with this JSDoc syntax typescript doesn't recognize the params correctly.
Code
// A *self-contained* demonstration of the problem follows...
// Test this by running `tsc` on the command-line, rather than through another build tool such as Gulp, Webpack, etc.
/**
* @param {!object} args
* @param {!string} args.prop1
* @param {?string} args.prop2
*/
function patate(args) {
const { prop1, prop2 } = args;
}
Expected behavior: No errors
Actual behavior: With allowJs and checkJs, I get JSDoc '@param' tag has name 'prop1', but is no parameter with that name.
Playground Link:
Related Issues: https://github.com/Microsoft/TypeScript/issues/19645
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
Issue にある自己完結型の JavaScript 例から始め、allowJs と checkJs を有効にして tsc を実行します。コンパイラが複数の @param を含む JSDoc 宣言をどのように処理するかを調査します。完了条件は、その例が args.prop1 または args.prop2 に対する診断を生成しないことです。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- javascript, typescript
- 領域
- compilers
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- 明確に書かれている
- 初心者へのやさしさ
- 35/100