blakeembrey / blakeembrey/make-error-cause

Variable makeErrorCause is redeclared and causing issues in compiler

Open
#49 1 comment 1 reaction 0 assignees View on GitHub
Dominant language
TypeScript
Stars
69
Forks
8
PR merge metrics
No merged PRs in 30d

Description

Thank you for building this library. This section of code is causing some issues:
```
function makeErrorCause(value, _super) {
if (_super === void 0) { _super = makeErrorCause.BaseError; }
return makeError(value, _super);
}
var makeErrorCause;
```
The function/variable `makeErrorCause` is declared twice, and when SWC tries to compile this module, it throws a compile error that "the name `makeErrorCause` is defined multiple times."

I'm not sure why the 2nd `var` declaration is there, but commenting it out fixes the compile error.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.