assertValid
validate, but throws instead of returning a result.
Usage
try {
await ()
} catch () {
if ( instanceof ) {
.(.)
}
}Returns
- Type:
Promise<void>
Throws DdoValidationError when the document does not conform. The error carries the field
map on errors, and its message is already a readable one-liner.
Parameters
ddo
- Type:
unknown