Skip to main content

Module script

Module script 

Source
Expand description

Structural extraction for JavaScript and TypeScript.

The pass walks the token stream once, tracking brace depth to know which declaration owns what. It reads the forms a repository graph is built from: every import and re-export shape, declarations including class members, and call sites with their receiver and string arguments.

What it does not do is parse expressions. A call is recognised by an identifier followed by (, not by building an expression tree, because no consumer of these facts asks about precedence.

Functionsยง

extract
Extracts structural facts from one JavaScript or TypeScript source.