Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
chore: migrate src/Errors to TypeScript (#5725)
  • Loading branch information
jackfranklin committed Apr 23, 2020
1 parent 30aff82 commit 930cc32
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/Errors.js → src/Errors.ts
Expand Up @@ -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 {}

0 comments on commit 930cc32

Please sign in to comment.