Type Alias DiagnosticInfo<N, P>

DiagnosticInfo<N, P>: {
    code?: integer | string;
    codeDescription?: CodeDescription;
    data?: unknown;
    index?: number;
    keyword?: string;
    node: N;
    property?: P;
    range?: Range;
    relatedInformation?: DiagnosticRelatedInformation[];
    tags?: DiagnosticTag[];
}

Type Parameters

Type declaration

  • Optionalcode?: integer | string

    The diagnostic's code, which usually appear in the user interface.

  • OptionalcodeDescription?: CodeDescription

    An optional property to describe the error code.

  • Optionaldata?: unknown

    A data entry field that is preserved between a textDocument/publishDiagnostics notification and textDocument/codeAction request.

  • Optionalindex?: number

    In case of a multi-value property (array), an index can be given to select a specific element.

  • Optionalkeyword?: string

    If the value of a keyword is given, the diagnostic will appear at its corresponding text region

  • node: N

    The AST node to which the diagnostic is attached.

  • Optionalproperty?: P

    If a property name is given, the diagnostic is restricted to the corresponding text region.

  • Optionalrange?: Range

    If you want to create a diagnostic independent to any property, use the range property.

  • OptionalrelatedInformation?: DiagnosticRelatedInformation[]

    An array of related diagnostic information, e.g. when symbol-names within a scope collide all definitions can be marked via this property.

  • Optionaltags?: DiagnosticTag[]

    Additional metadata about the diagnostic.