Booleanish
Booleans written either as true/false or as the strings the DOM enumerates: the value type of enumerated attributes such as draggable, spellcheck and the aria-* flags.
Booleans written either as true/false or as the strings the DOM enumerates: the value type of
enumerated attributes such as draggable, spellcheck and the aria-* flags.
Import#
ts
import type { Booleanish } from "@shadow-js/web";
Signature#
ts
type Booleanish = boolean | "true" | "false"
Examples#
ts
import type { Booleanish } from "@shadow-js/web";
const expanded: Booleanish = "false";
const toggle = <button aria-expanded={expanded}>Menu</button>;