Skip to content

Function: throw_unless() ​

throw_unless(condition, exception): void

Defined in: src/runtime.ts:190

Throw an error unless a condition is met

Parameters ​

condition ​

unknown

The condition to check

exception ​

string | Error

The error to throw or the error message

Returns ​

void

Throws ​

If the condition is not met

Documentation of 1.0.13 , built from cf61d3b on 1.0.13 by pipeline #2985011498 on 2026-10-21.