UNPKG

@typed/io

Version:

Runtime IO type system

16 lines 439 B
import * as D from '../decoder'; import * as E from '../encoder'; import * as G from '../guard'; export const union = (members, name = getUnionName(members)) => { const g = G.union(members); const d = D.union(members); const e = E.Encoder.id(); return { ...g, ...d, ...e, name, }; }; const getUnionName = (types) => types.map((t) => t.name).join(' | '); //# sourceMappingURL=Union.js.map