IFClite TypeScript API
    Preparing search index...

    Interface ClashMatrixOptions

    Options accepted by matrix - picks the discipline preset mode plus run settings.

    interface ClashMatrixOptions {
        clearance?: number;
        excludeVoidsAndHosts?: boolean;
        exclusions?: ExclusionSet;
        maxCandidatePairs?: number;
        mode?: ClashMode;
        onProgress?: (p: ClashProgress) => void;
        signal?: AbortSignal;
        tolerance?: number;
    }

    Hierarchy (View Summary)

    Index
    clearance?: number

    Required gap (m) applied to every matrix rule when mode === 'clearance'. Without it a clearance matrix reports nothing (clearance is a per-rule field, not a run setting), so it is threaded onto the generated rules.

    excludeVoidsAndHosts?: boolean

    Apply exclusions (voids/hosts/assemblies). Default true.

    exclusions?: ExclusionSet

    Pair-exclusion set from an adapter.

    maxCandidatePairs?: number

    Safety cap on candidate pairs per rule, reported in result.truncated. This is a TS-backend guardrail: the WASM kernel runs every candidate pair in Rust and does not truncate, so when the cap would bite it returns the COMPLETE (uncapped) clash set rather than a truncated one. Use backend:'ts' when a deterministic cap matters. Defaults to unlimited.

    mode?: ClashMode

    Detection mode for the discipline-matrix preset rules. Default 'hard'.

    onProgress?: (p: ClashProgress) => void
    signal?: AbortSignal

    Cancels the run: it rejects with an AbortError DOMException instead of finishing.

    The TS backend checks it every 256 candidate pairs, and yields to the event loop at the first such checkpoint past ~50 ms of held thread time (then every ~50 ms after), rechecking immediately on the way back. So an abort raised from a timer or a UI handler stops the work in progress rather than merely refusing to start it — with one bound worth knowing: those handlers can only run during a yield, so a run that finishes inside the first ~50 ms never returns to the event loop and cannot observe an abort raised after it began. Cancellation is for runs long enough to be worth cancelling.

    (The WASM backend runs a whole rule inside one uninterruptible Rust call, so there it takes effect between rules.)

    tolerance?: number

    Default touching band (m).