We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b754048 commit 263e640Copy full SHA for 263e640
lib/typescript-compile-error.ts
@@ -2,6 +2,9 @@ export class TypeScriptCompileError extends Error {
2
constructor(message: string) {
3
super(message);
4
this.name = this.constructor.name;
5
+
6
+ // https://github.com/Microsoft/TypeScript-wiki/blob/main/Breaking-Changes.md#extending-built-ins-like-error-array-and-map-may-no-longer-work
7
+ Object.setPrototypeOf(this, new.target.prototype);
8
}
9
10
public static fromError(error: Error): TypeScriptCompileError {
0 commit comments