Boolean<T>

Sass'sboolean type.

Custom functions should respect Sass’s notion oftruthinessby treatingfalse andnull as falsey and everything else as truthy.

⚠️ Heads up!

Boolean values can’t be constructed, they can only beaccessed through theTRUE andFALSE constants.

Type Parameters

  • T extendsboolean =boolean

Hierarchy

  • Boolean

Constructors

Properties

Methods

Constructors

constructor

  • newBoolean<T extendsboolean>():Boolean<T>
  • Type Parameters

    • T extendsboolean =boolean

    ReturnsBoolean<T>

Properties

StaticReadonlyFALSE

FALSE:Boolean<false>

Sass'sfalse value.

StaticReadonlyTRUE

TRUE:Boolean<true>

Sass'strue value.

Methods

getValue

  • getValue():T
  • Returnstrue if this is Sass'strue value andfalse if this isSass'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;// true

    ReturnsT