TypeshadeDiagnostic
이 페이지에서

TypeshadeDiagnostic

인터페이스, 편집기 분류

Compiler diagnostic enriched with the source range and span that produced it.

import type { TypeshadeDiagnostic } from 'typeshade'

시그니처, 설명, 예제는 커밋 c66579bf의 컴파일러 소스에서 그대로 가져온 영어 원문입니다.

구문

interface TypeshadeDiagnostic {
readonly message: string;
readonly category: 'error' | 'warning' | 'message';
readonly code?: string;
readonly fileName: string;
readonly range: TypeshadeRange;
readonly span: TypeshadeTextSpan;
}

설명

span/range come directly from the compiler’s own start/length (see TsCompilerDiagnostic in src/compiler/ts/source-file.ts), which already cover the offending node — node.getStart(sourceFile) through node.getEnd() — or the file’s first statement when the diagnostic has no node behind it. Nothing here recomputes a one-character span from line/character any more.

인스턴스 속성

message읽기 전용 string

Human-readable diagnostic message.

category읽기 전용 'error' | 'warning' | 'message'

Diagnostic severity.

code선택 사항읽기 전용 string

Compiler-specific diagnostic code, when the diagnostic carries one.

fileName읽기 전용 string

Name of the source file the diagnostic was raised against.

range읽기 전용 TypeshadeRange

Zero-based half-open range the diagnostic covers.

span읽기 전용 TypeshadeTextSpan

UTF-16 offset span the diagnostic covers, equivalent to range.

소스

src/language-service.ts, 50행, 커밋 c66579bf 기준

이 페이지 편집 문제 보고