Skip to content

assert

Algorand TypeScript


Algorand TypeScript / index / assert

assert(condition, message?): asserts condition

Defined in: util.ts:19

Asserts that condition is truthy, otherwise error and halt execution.

unknown

An expression that can be evaluated as truthy of falsy

string

The message to show if condition is falsy and an error is raised.

asserts condition