Functions

f
candidates(input: string): string[]

The expressions to try for one line of input, in order.

f
declaration(input: string): Declaration | null

What a line declares, or null where it declares nothing.

f
importStatement(input: string): ImportStatement | MisreadImport | null

An import declaration, read into what it binds — or null for anything else.

f
isIncomplete(description: string): boolean

Whether a SyntaxError means the input is unfinished rather than wrong.

Interfaces

I
Binding

What one name in an import statement binds, and where in the module it comes from.

I
Declaration

A declaration made at a breakpoint: what it binds, to what, and how long it should last.

I
ImportStatement

An import statement typed at the prompt: what it reads, and what it binds.

  • bindings: Binding[]

    Every name it puts in scope. Empty for import './styles.css', which binds nothing.

  • specifier: string

    The module it reads, exactly as written — a path, or a package name.

I
MisreadImport

An import statement that could not be read, and the line that would have been read.