CompileResult

What a compile returns: the document and any warnings when ok is true, or an error message when it is false.

@internote/canvas-sdk/compileType
On this page
import { CompileResult } from '@internote/canvas-sdk/compile';

The error is a formatted string such as [parse] unclosed section (notes.chalk:12); the compiler's structured error rides along in details for a consumer that wants its category and location. A refinement or semantic error carries no details. Semantic warnings accompany a successful compile and do not fail it.

#Signature

{
    ok: true;
    data: ChalkDocument;
    warnings?: SemanticDiagnostic[];
} | {
    ok: false;
    error: string;
    details?: ChalkError;
}

Declared in packages/canvas-sdk/src/compile/result.ts:28.

Last updated