microsoft / microsoft/TypeScript
VSCode ignores JSDoc's @property when specify @typedef type in 1.43.2 and 1.44.0-insider
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 111k
- Forks
- 14.3k
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 132
Description
Seems like VSCode ignores @property when specify type inside @typedef in 1.43.2 and 1.44.0-insider. It cause type hint to show not so correct type information and also not detected inside autocomplete/intellisense.
- VSCode Version: 1.43.2 and 1.44.0-insider
- OS Version: Ubuntu 18.04 x86_64
Steps to Reproduce:
- Create JSDoc type definition file, for example
types.js. - Import the type into
form.js. - Ensure the type hint for the specified JSDoc is working properly (no
any) and the type is detected available inside autocomplete/intellisense.
Temporary Solution:
- Remove type from
@typedef, such us from@typedef {Object<string, any>} Personinto@typedef Person. - Or, remove
<string, any>from Object, such us@typedef {Object<string, any>} Personinto@typedef {Object} Person.
Reproduce Repo: https://github.com/jeffryang24/sandbox/tree/master/javascript/vscode-jsdoc-type-hint-issue
Does this issue occur when all extensions are disabled?: Yes/No
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the report with the linked sandbox, using its types.js and form.js examples and the reported VS Code versions or an available equivalent. Then trace the TypeScript JSDoc handling for @typedef, @property, and generic Object types; done means property type hints and autocomplete work without any while the existing reproduction remains covered by a regression test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, typescript, vscode
- Domain
- developer-experience, devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100