v2.4.0
When trying to use this export with bun, tsx, or others it comes in as undefined.
Really the whole bit is skuffed:
import { Fail, Ok, Result } from '@eicode/result-pattern';
Results in:
var __defProp=Object.defineProperty;var __name=(target,value)=>__defProp(target,"name",{value,configurable:true});import{Fail,Ok}from"@eicode/result-pattern";function combine(...results){const fails=results.filter(r=>r
instanceof Fail);if(fails.length>0){const failValues=fails.map(f=>f.value);return new Fail(failValues)}const okValues=results.map(r=>r.unwrapOr(null));return new Ok(okValues)}__name(combine,"combine");async function trySync(fn){try{const value=await fn();return new Ok(value)}catch(error){return new Fail(error)}}__name(trySync,"trySync");function ok(value){return new Ok(value)}__name(ok,"ok");function fail(error){return new Fail(error)}__name(fail,"fail");export{combine,fail,ok,trySync};
^^^^
SyntaxError: The requested module '@eicode/result-pattern' does not provide an export named 'Fail'
at ModuleJob._instantiate (node:internal/modules/esm/module_job:132:21)
at async ModuleJob.run (node:internal/modules/esm/module_job:214:5)
at async ModuleLoader.import (node:internal/modules/esm/loader:329:24)
at async loadESM (node:internal/process/esm_loader:34:7)
at async handleMainPromise (node:internal/modules/run_main:113:12)
v2.4.0When trying to use this export with bun, tsx, or others it comes in as undefined.
Really the whole bit is skuffed:
Results in: