Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Extern exports

export-externs reads TypeScript extern(...) declarations.

xrf-cli export-externs <declarations-root> --format json --output <path>

Manifest source paths are relative to the declarations root.

Formats

  • json: tracked { "exports": ... } contract; CRLF by default.
  • xml: <externs><exports> document; LF by default.
  • html: collapsed namespace reference; LF by default.

Use --line-endings lf|crlf to override the default.

xrf-cli export-externs src/engine/declarations --format html --output target/parsed/externs.html

Check

--check <artifact> validates without writing and cannot be combined with --output.

xrf-cli export-externs src/engine/declarations --check src/engine/declarations/extern.json

The format is inferred from the extension unless --format is provided. JSON is compared semantically; XML and HTML are compared as rendered text with line-ending differences ignored.

The engine wrapper is npm run cli -- verify externs. It is not a build or CI gate.

Requirements

Names must be unique string literals. Missing or unrenderable callable types are emitted as unknown. Values need value as Type. The command skips *.test.ts, *.spec.ts, and __test__ sources.