microsoft / microsoft/TypeScript

Overloads do not emit JSDoc on non-implementation signatures

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

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

Domain: Comment Emit Experience Enhancement Suggestion
主要言語
Go
スター
111k
フォーク
14.3k
平均マージ
2日 4時間
マージ済み PR(30日)
132

説明

TypeScript Version: 3.2.0-dev.201xxxxx

Search Terms:

Code

.ts file

/**
 * this will lost
 */
function a()
function a() { }

/**
 * this will keep
 */
function b() { }

function c()
/**
 * this will keep, but i don't think this is good way
 */
function c() { }

Expected behavior:

all will keep

/**
 * this will lost
 */
function a() { }
/**
 * this will keep
 */
function b() { }
/**
 * this will keep, but i don't think this is good way
 */
function c() { }

Actual behavior:

a is lost

output .js file

function a() { }
/**
 * this will keep
 */
function b() { }
/**
 * this will keep, but i don't think this is good way
 */
function c() { }

and when it at .d.ts

  • a will keep
  • b will keep too
  • but c will lost

Playground Link:
http://www.typescriptlang.org/play/index.html#src=%2F**%0D%0A%20*%20this%20will%20lost%0D%0A%20*%2F%0D%0Afunction%20a()%0D%0Afunction%20a()%20%7B%20%7D%0D%0A%0D%0A%2F**%0D%0A%20*%20this%20will%20keep%0D%0A%20*%2F%0D%0Afunction%20b()%20%7B%20%7D%0D%0A%0D%0Afunction%20c()%0D%0A%2F**%0D%0A%20*%20this%20will%20keep%2C%20but%20i%20don%27t%20think%20this%20is%20good%20way%0D%0A%20*%2F%0D%0Afunction%20c()%20%7B%20%7D

Related Issues:

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

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

はじめの一歩

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

調査の方向性

提供されている .ts のオーバーロード例、またはリンク先の TypeScript Playground から始め、報告されている TypeScript バージョンを使用して、生成された .js と .d.ts の出力を比較します。実装ではないオーバーロードシグネチャの JSDoc が、関連する出力で一貫して保持されれば完了です。

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

評価

技術スタック
typescript
領域
compilers
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
32/100

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

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