export function resultOk(res) {
    return { ok: true, res };
}
export function resultErr(e) {
    if (e instanceof Error) {
        return { ok: false, err: e };
    }
    else {
        return { ok: false, err: new Error(e) };
    }
}
export function isOk(result) {
    return result.ok;
}
export function isErr(result) {
    return !result.ok;
}
//# sourceMappingURL=result.js.map