Spec-Zone.ru › Sass

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.

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

Type Parameters

  • T extends boolean = boolean

Hierarchy

  • Boolean
  • Defined in js-api-doc/legacy/function.d.ts:379
Index

Constructors

constructor

Properties

FALSE TRUE

Methods

getValue

Constructors

constructor

  • new Boolean<T extends boolean>(): Boolean<T>
  • Type Parameters

    • T extends boolean = boolean

    Returns Boolean<T>

Properties

Static Readonly FALSE

FALSE: Boolean<false>

Sass's false value.

  • Defined in js-api-doc/legacy/function.d.ts:402

Static Readonly TRUE

TRUE: Boolean<true>

Sass's true value.

  • Defined in js-api-doc/legacy/function.d.ts:399

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

    • Defined in js-api-doc/legacy/function.d.ts:396
sass
  • Compile
    • AsyncCompiler
    • Compiler
    • CompileResult
    • compile
    • compileAsync
    • compileString
    • compileStringAsync
    • initAsyncCompiler
    • initCompiler
  • Options
    • Options
    • StringOptions
    • OutputStyle
    • StringOptionsWithImporter
    • StringOptionsWithoutImporter
    • Syntax
  • Logger
    • Logger
      • silent
    • Logger
    • SourceLocation
    • SourceSpan
    • LoggerWarnOptions
  • Importer
    • NodePackageImporter
    • FileImporter
    • Importer
    • ImporterResult
  • Custom Function
    • CalculationInterpolation
    • CalculationOperation
    • SassArgumentList
    • SassBoolean
    • SassCalculation
    • SassColor
    • SassFunction
    • SassList
    • SassMap
    • SassMixin
    • SassNumber
    • SassString
    • Value
    • CalculationOperator
    • CalculationValue
    • CustomFunction
    • ListSeparator
    • sassFalse
    • sassNull
    • sassTrue
  • Other
    • Exception
    • CanonicalizeContext
    • Deprecations
    • LegacyFileOptions
    • ChannelName
    • ChannelNameHsl
    • ChannelNameHwb
    • ChannelNameLab
    • ChannelNameLch
    • ChannelNameRgb
    • ChannelNameXyz
    • ColorSpaceHsl
    • ColorSpaceHwb
    • ColorSpaceLab
    • ColorSpaceLch
    • ColorSpaceRgb
    • ColorSpaceXyz
    • GamutMapMethod
    • HueInterpolationMethod
    • KnownColorSpace
    • PolarColorSpace
    • PromiseOr
    • RectangularColorSpace
    • info
  • Legacy
    • types
      • Boolean
      • Color
      • Error
      • List
      • Map
      • Null
      • Number
      • String
    • LegacyException
    • LegacyImporterThis
    • LegacyPluginThis
    • LegacyResult
    • LegacySharedOptions
    • LegacyStringOptions
    • LegacyAsyncFunction
    • LegacyAsyncFunctionDone
    • LegacyAsyncImporter
    • LegacyFunction
    • LegacyImporter
    • LegacyImporterResult
    • LegacyOptions
    • LegacySyncFunction
    • LegacySyncImporter
    • LegacyValue
    • FALSE
    • NULL
    • TRUE
    • render
    • renderSync
  • Messages
    • Version
    • Deprecation
    • DeprecationOrId
    • DeprecationStatus
    • deprecations

© 2006–2025 the Sass team, and numerous contributors
Licensed under the MIT License.
https://sass-lang.com/documentation/js-api/classes/types.Boolean

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API