make-error-cause icon indicating copy to clipboard operation
make-error-cause copied to clipboard

Variable makeErrorCause is redeclared and causing issues in compiler

Open alanhett opened this issue 2 years ago • 1 comments

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.

alanhett avatar Aug 30 '23 01:08 alanhett

Same for Bun. tsc puts it there...

tr-jason avatar Jan 19 '24 04:01 tr-jason