Skip to content

compile

compile(source, options?): CompileResult

Defined in: packages/compiler/src/compile.ts:66

Compile, or explain the refusal. This never throws for a document it cannot use.

A stage raises a StageRefusal when the source does not support a program, and that becomes a result rather than an exception: one malformed packet must not take down a batch, and “could not read the document” is an answer a caller can act on.

Anything else propagates. A compiler bug reported as an unsupported pedal would be a wrong answer about someone’s circuit, so the catch is deliberately narrow.

string

CompileOptions = ...

CompileResult