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 {}