We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
TSError
diagnosticText
1 parent 26c3774 commit 2ffcbe3Copy full SHA for 2ffcbe3
src/index.ts
@@ -462,9 +462,15 @@ export const DEFAULTS: RegisterOptions = {
462
*/
463
export class TSError extends BaseError {
464
name = 'TSError';
465
+ diagnosticText!: string;
466
- constructor(public diagnosticText: string, public diagnosticCodes: number[]) {
467
+ constructor(diagnosticText: string, public diagnosticCodes: number[]) {
468
super(`⨯ Unable to compile TypeScript:\n${diagnosticText}`);
469
+ Object.defineProperty(this, 'diagnosticText', {
470
+ configurable: true,
471
+ writable: true,
472
+ value: diagnosticText,
473
+ });
474
}
475
476
/**
0 commit comments