microsoft / microsoft/TypeScript

Behavior difference: Comment above `@typedef` does not become comment for the corresponding emitted type in tsgo

オープン
#63,841 コメント 0 件 リアクション 2 件 担当者 2 名 GitHub で見る

@jakebailey がすでに取り組んでいます。

2026年6月18日 から。

  • #4365 @copilot-swe-agent による — マージされずにクローズ
主要言語
Go
スター
111k
フォーク
14.3k
平均マージ
2日 4時間
マージ済み PR(30日)
132

説明

Another follow-up on https://github.com/microsoft/typescript-go/issues/4235.


Steps to reproduce

  1. Start a plain new project
    • "@typescript/native-preview": "7.0.0-dev.20260618.1",
    • "typescript": "6.0.3"
  2. Run npx tsgo --init to get the default tsconfig. Turn on these flags as well.
    • "allowJs": true,
    • "checkJs": true,
    • "stableTypeOrdering": true,
  3. Add src/main.js. Run npx tsc & npx tsgo to see the difference.
/**
 * Comment on the `Foo` type
 *
 * @typedef {Object} Foo
 * @property {boolean} bool Whether `.bool` is true or not
 */

Behavior with typescript@6.0

/**
 * Comment on the `Foo` type
 */
export type Foo = {
    /**
     * Whether `.bool` is true or not
     */
    bool: boolean;
};

Behavior with tsgo

export type Foo = {
    /**
     * Whether `.bool` is true or not
     */
    bool: boolean;
};
/**
 * Comment on the `Foo` type
 *
 * @typedef {Object} Foo
 * @property {boolean} bool Whether `.bool` is true or not
 */

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

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

はじめの一歩

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

評価

この issue はまだ評価されていません。

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

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