`SourceNode.children` type incorrect

Open
#482 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
1/5
Estimated time
Under an hour
Newbie friendliness
55/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
javascript
Domain
devtools

Research direction

Start with the referenced children handling in lib/source-node.js around line 195, then inspect the corresponding declaration in source-map.d.ts. Update the declaration so children accepts SourceNode or string values, and confirm the published type matches the implementation.

Written by the indexing model from the issue text.

Description

According to

https://github.com/mozilla/source-map/blob/4e304db915cecd42505feb007766a034395c6eb7/lib/source-node.js#L195

SourceNode.children should have a type (SourceNode | string)[], but source-map.d.ts lists the type as SourceNode[]

Dominant language
JavaScript
Stars
3.7k
Forks
370
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from mozilla/source-map

All issues in mozilla/source-map

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.