chore: migrate src/Errors to TypeScript (#5725)

This commit is contained in:
Jack Franklin 2020-04-23 12:53:47 +01:00 committed by GitHub
parent 30aff827ea
commit 930cc32baf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -15,15 +15,11 @@
*/
class CustomError extends Error {
constructor(message) {
constructor(message: string) {
super(message);
this.name = this.constructor.name;
Error.captureStackTrace(this, this.constructor);
}
}
class TimeoutError extends CustomError {}
module.exports = {
TimeoutError,
};
export class TimeoutError extends CustomError {}