import { mo } from 'moroutine'; export const double = mo(import.meta, (x: number) => 2 * x); export const add = mo(import.meta, (a: number, b: number) => a + b); export const fail = mo(import.meta, (msg: string) => { throw new Error(msg); }); export const failType = mo(import.meta, (msg: string) => { throw new TypeError(msg); }); export const failCause = mo(import.meta, (msg: string) => { throw new Error(msg, { cause: new RangeError('root cause') }); });