microsoft / microsoft/TypeScript
Typedef of object with generic property fails since 5.1
Ouverte
@sandersn y travaille déjà.
Depuis le 12/6/2023.
Needs Investigation
- Langage dominant
- Go
- Étoiles
- 111k
- Forks
- 14.4k
- Merge moyen
- 1 j 19 h
- PR mergées (30 j)
- 117
Description
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
*/
Guide de contribution
Ouvrir le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Évaluation
Cette issue n'a pas encore été évaluée.