@levimc-lse/scaffold
Version:
A utility for assisting in the development of Legacy Script Engine plugins.
24 lines (23 loc) • 883 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.TypeScriptConfigurationParseError = void 0;
class TypeScriptConfigurationParseError extends Error {
constructor(filePath, diagnostics = null) {
const message = `Failed to parse ${filePath}.`;
super(message);
this.msg = message;
this.diagnostics = diagnostics;
}
getMessage() {
return this.msg;
}
getSuggestion() {
const suggestion = new Array();
suggestion.push("Try checking the tsconfig.json.");
if (this.diagnostics !== null) {
suggestion.push(`Try to resolve the issue based on the diagnostic information from the TypeScript compiler: ${JSON.stringify(this.diagnostics)}`);
}
return suggestion;
}
}
exports.TypeScriptConfigurationParseError = TypeScriptConfigurationParseError;