@typed/io
Version:
Runtime IO type system
17 lines • 532 B
JavaScript
import * as D from '../decoder';
import * as E from '../encoder';
import * as G from '../guard';
const getIntersectionName = (types) => types.map((t) => t.name).join(' & ');
export function intersection(types, name = getIntersectionName(types)) {
const guard = G.intersection(types);
const decoder = D.intersection(types);
const encoder = E.intersection(types);
return {
...guard,
...decoder,
...encoder,
name,
members: types,
};
}
//# sourceMappingURL=Intersection.js.map