Skip to content

Function: throw_if() ​

throw_if(condition, exception): void

Defined in: src/runtime.ts:177

Throw an error if 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 met

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