From cc15f2ffffaf862e4b4c0387374a740c6cabd284 Mon Sep 17 00:00:00 2001 From: Nick Fields <46869826+nick-fields@users.noreply.github.com> Date: Sun, 24 Sep 2023 20:41:06 -0400 Subject: [PATCH] minor: forgot to set ctor props --- dist/index.js | 2 ++ src/index.ts | 2 ++ 2 files changed, 4 insertions(+) diff --git a/dist/index.js b/dist/index.js index badae57..281513e 100644 --- a/dist/index.js +++ b/dist/index.js @@ -963,6 +963,8 @@ var ErrorWithCode = /** @class */ (function (_super) { var _this = _super.call(this) || this; _this.message = message; _this.code = code; + _this.code = code; + _this.message = message; return _this; } return ErrorWithCode; diff --git a/src/index.ts b/src/index.ts index e477ad2..6568ec0 100644 --- a/src/index.ts +++ b/src/index.ts @@ -16,6 +16,8 @@ let done: boolean; class ErrorWithCode extends Error { constructor(readonly message: string, readonly code: number) { super(); + this.code = code; + this.message = message; } }