G-code Preview — API Reference
    Preparing search index...
    interface WireParseOptions {
        containers?: false | string[] | "auto";
        dialectConfig?: Record<string, unknown>;
        dialects?: false | string[] | "auto";
        extruderFollowsPositioning?: boolean;
        limits?: Partial<ParseLimits>;
        minLayerThreshold?: number;
        onCommand?: (event: CommandEvent) => void;
        onComment?: (text: string, srcByte: number) => void;
        parserVersion?: string;
        partialOnCancel?: boolean;
        partialPreview?: false | { intervalMs?: number; minInputBytes?: number };
        plate?: number;
        sourceId?: string;
        yieldIntervalMs?: number;
    }

    Hierarchy (View Summary)

    Index

    Properties

    containers?: false | string[] | "auto"

    Container extraction (DD-005 §4.4): 'auto' (default) sniffs sliceable inputs against the worker entry's registered container adapters; an array restricts by id; false disables.

    dialectConfig?: Record<string, unknown>

    Per-adapter structured-cloneable configuration, keyed by adapter id.

    dialects?: false | string[] | "auto"

    Dialect annotation (DD-005 §4.5): SERIALIZABLE selection only — adapter implementations live inside the worker entry. 'auto' (default) runs detection over the entry's registered set; an array restricts by id; false disables.

    extruderFollowsPositioning?: boolean

    Firmware hint (DD-010 D2): does G90/G91 also set the extruder mode? Marlin/Klipper — true; RepRapFirmware treats E independently — false. Default false (RRF/unknown-conservative). Only consulted while no M82/M83 has latched the E-mode; supplied by the dialect layer / caller that has confidently classified the firmware. The byte-exact engine never sniffs firmware itself.

    limits?: Partial<ParseLimits>
    minLayerThreshold?: number

    Layer-detection tolerance (inherited default 0.05).

    onCommand?: (event: CommandEvent) => void
    onComment?: (text: string, srcByte: number) => void

    DD-005 §4.3 read-only hooks: observe comments/commands during the parse. Inert when unset (one branch per line); they cannot alter lexing, dispatch, or machine state — the golden-gated semantics are untouched.

    parserVersion?: string
    partialOnCancel?: boolean

    Attach the bounded partial IR to a cancelled response (DD-003 §5.2).

    partialPreview?: false | { intervalMs?: number; minInputBytes?: number }

    Progressive preview (DD-004 §5.4, issue #60). Default 'auto': partial snapshots stream once bytesProcessed ≥ minInputBytes (default 25 MiB, provisional until #61 ratifies), at most one per intervalMs (default 1000). false disables; { minInputBytes: 0 } forces immediate previews.

    plate?: number

    Plate selection for multi-plate containers (default 0 + a container-multiple-plates warning carrying the discovered plate list).

    sourceId?: string
    yieldIntervalMs?: number

    Cooperative yield interval override (tests only; default 50 ms).