UNPKG

ts-simple-ast

Version:

TypeScript compiler wrapper for AST navigation and code generation.

41 lines (40 loc) 912 B
import * as ts from "typescript"; import { SourceFile } from "./../../../compiler"; import { DiagnosticMessageChain } from "./DiagnosticMessageChain"; /** * Diagnostic. */ export declare class Diagnostic { /** * Gets the underlying compiler diagnostic. */ readonly compilerObject: ts.Diagnostic; /** * Gets the source file. */ getSourceFile(): SourceFile | undefined; /** * Gets the message text. */ getMessageText(): string | DiagnosticMessageChain; /** * Gets the start. */ getStart(): number | undefined; /** * Gets the length. */ getLength(): number | undefined; /** * Gets the diagnostic category. */ getCategory(): ts.DiagnosticCategory; /** * Gets the code of the diagnostic. */ getCode(): number; /** * Gets the source. */ getSource(): string | undefined; }