mozilla / mozilla/source-map

`SourceNode.children` type incorrect

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

Nobody has claimed this yet.

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

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[]

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.

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.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.