TOC Toolkit API - v0.1.0
    Preparing search index...

    Interface Issue<Code, Target>

    A problem that a check found in what the user wrote or drew. Each package declares an enum with the codes of the issues that it raises, and Code is that enum. Target is the type of the thing that an issue points at, such as the id of a state. An issue whose type names no target cannot hold a target.

    interface Issue<Code extends string, Target = never> {
        severity: Severity;
        code: Code;
        message: string;
        span?: Span;
        target?: Target;
        fixes?: readonly TextFix[];
    }

    Type Parameters

    • Code extends string
    • Target = never
    Index
    severity: Severity
    code: Code
    message: string

    A sentence for the user that says what is wrong.

    span?: Span

    The part of the source text that the issue is about.

    target?: Target

    The part of the model that the issue is about.

    fixes?: readonly TextFix[]

    The edits that resolve the issue, in the order in which to offer them.