UNPKG

ts-simple-ast

Version:

TypeScript compiler wrapper for AST navigation and code generation.

49 lines (47 loc) 1.21 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); /** * Diagnostic message chain. */ class DiagnosticMessageChain { /** @internal */ constructor(global, compilerObject) { this.global = global; this._compilerObject = compilerObject; } /** * Gets the underlying compiler object. */ get compilerObject() { return this._compilerObject; } /** * Gets the message text. */ getMessageText() { return this.compilerObject.messageText; } /** * Gets th enext diagnostic message chain in the chain. */ getNext() { const next = this.compilerObject.next; if (next == null) return undefined; return this.global.compilerFactory.getDiagnosticMessageChain(next); } /** * Gets the code of the diagnostic message chain. */ getCode() { return this.compilerObject.code; } /** * Gets the category of the diagnostic message chain. */ getCategory() { return this.compilerObject.category; } } exports.DiagnosticMessageChain = DiagnosticMessageChain; //# sourceMappingURL=DiagnosticMessageChain.js.map