Skip to content

Commit 079cf2b

Browse files
committed
chore: Remove deprecated method.
1 parent 431cf71 commit 079cf2b

File tree

2 files changed

+0
-23
lines changed

2 files changed

+0
-23
lines changed

lib/typescript-compile-error.spec.ts

-11
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,4 @@ describe("TypeScriptCompileError", () => {
3434
expect(tscError).not.toContainEqual(testMsg);
3535
});
3636
});
37-
38-
describe("toObject", () => {
39-
it("should support legacy usage of this method", () => {
40-
const tscError = new TypeScriptCompileError("Test Error");
41-
const errObj = tscError.toObject();
42-
43-
expect(errObj.message).toStrictEqual(tscError.message);
44-
expect(errObj.name).toStrictEqual(tscError.name);
45-
expect(errObj.stack).toStrictEqual(tscError.stack);
46-
});
47-
});
4837
});

lib/typescript-compile-error.ts

-12
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,4 @@ export class TypeScriptCompileError extends Error {
2020

2121
return newError;
2222
}
23-
24-
/**
25-
* Support legacy usage of this method.
26-
* @deprecated
27-
*/
28-
public toObject() {
29-
return {
30-
message: this.message,
31-
name: this.name,
32-
stack: this.stack,
33-
};
34-
}
3523
}

0 commit comments

Comments
 (0)