microsoft / microsoft/TypeScript
[API] Narrow types of `Node` attributes when possible
Open
@andrewbranch is already working on this.
Since Aug 11, 2026.
Needs Investigation
- Dominant language
- Go
- Stars
- 111k
- Forks
- 14.3k
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 132
Description
In TS 6, many node attributes were typed with the types which they would always be at runtime. In TS 7 this information has been lost.
- `JSDocTypedefTag#parent` should be `JSDoc`
- `JSDocTypedefTag#typeExpression` should probably be `TypeNode`
- `Node#jsDoc` should be `readonly JSDoc[]`
There are likely others I haven't noticed yet
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.
Assessment
This issue has not been assessed yet.