microsoft / microsoft/TypeScript
duplicate comments on decorated fields
オープン
まだ誰も着手していません。
Bug
Domain: Comment Emit
Help Wanted
- 主要言語
- Go
- スター
- 111k
- フォーク
- 14.4k
- 平均マージ
- 1日 19時間
- マージ済み PR(30日)
- 117
説明
🔎 Search Terms
typescript duplicate comments
🕗 Version & Regression Information
- This changed between versions ______ and _______
- This changed in commit or PR _______
- This is the behavior in every version I tried, and I reviewed the FAQ for entries about _________
- I was unable to test this on prior versions because _______
⏯ Playground Link
💻 Code
class SharedAPI {}
export class Scene extends SharedAPI {
/**
* @property {boolean} webgl -
*/
@booleanAttribute webgl = false
/**
* @property {boolean} foo -
*/
@booleanAttribute foo = false
}
🙁 Actual behavior
duplicate comments for the foo property appear in output
🙂 Expected behavior
No duplicate comments
Additional information about the issue
The output shows this:
constructor() {
super(...arguments);
/**
* @property {boolean} webgl -
*/
this.webgl = __runInitializers(this, _webgl_initializers, false
/**
* @property {boolean} foo -
*/
);
/**
* @property {boolean} foo -
*/
this.foo = (__runInitializers(this, _webgl_extraInitializers), __runInitializers(this, _foo_initializers, false));
__runInitializers(this, _foo_extraInitializers);
}
There's an extra @property {boolean} foo - comment in the output.
Similar issue:
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
target ES2022 と TypeScript 5.5.0-beta を使用して、リンクされている TypeScript Playground の再現例から始め、装飾された webgl フィールドと foo フィールドに対して出力された JavaScript を比較します。foo プロパティの JSDoc コメントが 1 回だけ現れ、期待されるデコレーター初期化の出力がそのまま維持されれば、変更は完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- typescript
- 領域
- compilers
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- 明確に書かれている
- 初心者へのやさしさ
- 48/100