TypstDocumentation

assert

Ensure that a condition is fulfilled.

Fails with an error if the condition is not fulfilled. Does not produce any output in the document.

Example

#assert(1 < 2)
Preview

Parameters
Question mark

assert()

condition
booleanRequiredPositional
Question mark

The condition that must be true for the assertion to pass.