ImplementedKindToNodeMappings is missing some children
- Dominant language
- TypeScript
- Stars
- 6.2k
- Forks
- 238
- Avg merge
- 2m
- Merged PRs (30d)
- 1
Description
**Describe the bug**
Version: 20.0.0
Node.js v20.5.0
TS Node: 10.9.1
**To Reproduce**
```ts
const nodes = sourceFile.getDescendantsOfKind(SyntaxKind.JsxAttributes);
// The type of nodes is Node[], not the expected Node[]
```
The fix for this bug might involve adding the line for `JsxAttributes` to `ImplementedKindToNodeMappings`
```ts
export interface ImplementedKindToNodeMappings {
...
[SyntaxKind.JsxAttributes]: JsxAttributes;
...
}
```
I am not sure if any other node types are missing in the mapping too.
Contributor guide
Research direction
Search the codebase for ImplementedKindToNodeMappings and inspect how getDescendantsOfKind derives its return type. Reproduce the JsxAttributes example, check whether other SyntaxKind entries are missing, and verify that the resulting nodes are typed as Node after the mapping is corrected.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100