Skip to content

Commit

Permalink
minor: forgot to set ctor props
Browse files Browse the repository at this point in the history
  • Loading branch information
nick-fields committed Sep 25, 2023
1 parent db9d6ef commit cc15f2f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 2 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}

Expand Down

0 comments on commit cc15f2f

Please sign in to comment.