meo-canvas
    Preparing search index...

    Interface Diagnostic

    Something the caller wrote that the renderer could not use.

    Raised where the mistake is still visible: a value that was dropped and a value that was never written are the same absence one layer down, so the only place that can tell them apart is the one that did the dropping.

    interface Diagnostic {
        detail: string;
        offset?: number;
        path: string;
    }
    Index
    detail: string

    What was wrong with it, and what was done instead.

    offset?: number

    Where in the markup it was, as a byte offset into the string that was passed in, or absent for a diagnostic that did not come from markup.

    The offset of the tag's <, so the tag begins at that index of the original string. Two tags spelled the same way are otherwise indistinguishable: '<color=zzz>a</color><color=zzz>b</color>' reports the same path twice.

    There is no end. A backslash escape inside a tag changes its length between the string as written and the text the parser scans, so a length would be right only for tags containing no escapes — and nothing would mark the ones where it lies.

    path: string

    Where the value was, as it was written.

    A path rather than a property name, because a value nested inside another has no single name that would find it — <color=zzz> for markup, segments[0].fontSize for a run.