microsoft / microsoft/TypeScript

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

Abierto
#63,841 0 comentarios 2 reacciones 2 asignados Ver en GitHub

@jakebailey ya está trabajando en esto.

Desde el 18/6/2026.

  • #4365 de @copilot-swe-agent — cerrado sin fusionar
Lenguaje dominante
Go
Estrellas
111k
Forks
14.3k
Merge medio
2 d 4 h
PR fusionados (30 d)
132

Descripción

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
 */

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.