assertStruct<Type, Schema>(value: unknown, struct: Struct<Type, Schema>, errorPrefix?: string, ErrorWrapper?: AssertionErrorConstructor): asserts value is Type
Assert a value against a Superstruct struct.
Throws
If the value is not valid.
Type Parameters
Type
Schema
Parameters
value: unknown
The value to validate.
struct: Struct<Type, Schema>
The struct to validate against.
errorPrefix: string = 'Assertion failed'
A prefix to add to the error message. Defaults to
"Assertion failed".
Assert a value against a Superstruct struct.
Throws
If the value is not valid.