From 930cc32baf78a875c60ee371f517e5407e3b9128 Mon Sep 17 00:00:00 2001 From: Jack Franklin Date: Thu, 23 Apr 2020 12:53:47 +0100 Subject: [PATCH] chore: migrate src/Errors to TypeScript (#5725) --- src/{Errors.js => Errors.ts} | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) rename src/{Errors.js => Errors.ts} (87%) diff --git a/src/Errors.js b/src/Errors.ts similarity index 87% rename from src/Errors.js rename to src/Errors.ts index 1bcfc2d0760a6..ae619a99bc859 100644 --- a/src/Errors.js +++ b/src/Errors.ts @@ -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 {}