Skip to content
ZOLO / TE758 Type · error

structural Verniz condition must be a checked bool

Compiler diagnostic TE758: structural Verniz condition must be a checked bool.

A structural v:if directive decides whether a component or native element is evaluated. Its condition must have type bool. Values of type Any, unresolved types, numbers and strings cannot supply that condition, including when ordinary type checking is disabled.

use std::html::*

let visible = true
<span v:if={visible}>ready</span>

Compare a value explicitly to express your intent:

use std::html::*

let count = 2
<span v:if={count > 0}>items available</span>

The check happens before rendering. A false condition skips the element's arguments and children.

Global index

Find your way through Zolo

Try an idea

Start here

9 results

9 results

en