microsoft / microsoft/TypeScript
Typedef of object with generic property fails since 5.1
Abierto
@sandersn ya está trabajando en esto.
Desde el 12/6/2023.
Needs Investigation
- Lenguaje dominante
- Go
- Estrellas
- 111k
- Forks
- 14.4k
- Merge medio
- 1 d 19 h
- PR fusionados (30 d)
- 117
Descripción
Bug Report
🔎 Search Terms
generic typedef object
🕗 Version & Regression Information
- This changed between versions 5.0.4 and 5.1.3
⏯ Playground Link
Playground link with relevant code
💻 Code
/**
* @typedef {Object} O
* @property {Array<T>} a Array of T
* @template T
*/
🙁 Actual behavior
Templated properties produce an error since upgrading TS to 5.1.3
🙂 Expected behavior
Generic properties should work as in 5.0.4
This still works, but it should be functionally equivalent to the typedef above. Though the syntax with @property is preferable as each property can be documented with a description.
/**
* @typedef {{a: Array<T>}} O
* @template T
*/
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Evaluación
Este issue todavía no se ha evaluado.