Skip to content

Unknown

This is a catch-all schema that allows any value, and corresponds to the unknown TypeScript type. It can be useful in object schemas for fields where any value should be accepted.

import * as p from '@vbudovski/paseri';
const schema = p.unknown();
const data = 'foo';
const result = schema.safeParse(data);
if (result.ok) {
// result.value typed as `unknown`.
}
Schema
p.unknown()
Data
'foo'
Result