Class Boolean<T>

Sass's boolean type.

Custom functions should respect Sass’s notion of truthiness by treating false and null as falsey and everything else as truthy.

⚠️ Heads up!

Boolean values can't be constructed, they can only be accessed through the TRUE and FALSE constants.

Type parameters

  • T: boolean = boolean

Hierarchy

  • Boolean

Index

Constructors

Properties

Methods

Constructors

constructor

  • Type parameters

    • T: boolean = boolean

    Returns Boolean<T>

Properties

Static Readonly FALSE

FALSE: Boolean<false>

Sass's false value.

Static Readonly TRUE

TRUE: Boolean<true>

Sass's true value.

Methods

getValue

  • getValue(): T
  • Returns true if this is Sass's true value and false if this is Sass's false 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; // true

    Returns T