Union
Example
import * as p from '@vbudovski/paseri';
const schema = p.union(p.number(), p.string());const data = 'foo';
const result = schema.safeParse(data);if (result.ok) { // result.value typed as `number | string`.}
import * as p from '@vbudovski/paseri';
const schema = p.union(p.number(), p.string());const data = 'foo';
const result = schema.safeParse(data);if (result.ok) { // result.value typed as `number | string`.}