Boolean<T>
Type Parameters
-
T extends boolean = boolean
Hierarchy
- Boolean
Index
Constructors
constructor
Properties
Static
Readonly
FALSE
Sass's false
value.
Static
Readonly
TRUE
Sass's true
value.
Methods
get Value
- get
Value(): T -
Returns
true
if this is Sass'strue
value andfalse
if this is Sass'sfalse
value.Example
// boolean is `true`.
boolean.getValue(); // true
boolean === sass.types.Boolean.TRUE; // true
// boolean is `false`.
boolean.getValue(); // false
boolean === sass.types.Boolean.FALSE; // trueReturns T
Sass's boolean type.
Custom functions should respect Sass’s notion of truthiness by treating
false
andnull
as falsey and everything else as truthy.⚠️ Atenção!
Boolean values can’t be constructed, they can only be accessed through the TRUE and FALSE constants.