@typed/io
Version:
Runtime IO type system
9 lines • 388 B
JavaScript
import * as G from '../guard';
import { Any, Type } from './Type';
export const either = (left, right) => {
const type = Type.fromGuard(G.either(left, right), `Either<${left.name}, ${right.name}>`, `Either<${left.expected}, ${right.expected}>`);
return { ...type, left, right };
};
const _Either = either(Any, Any);
export { _Either as Either };
//# sourceMappingURL=Either.js.map