Spec-Zone.ru › Sass

AsyncCompiler

The result of creating an asynchronous compiler. Returned by initAsyncCompiler.

Hierarchy

  • AsyncCompiler
  • Defined in js-api-doc/compile.d.ts:89
Index

Constructors

constructor

Methods

compileAsync compileStringAsync dispose

Constructors

Private constructor

  • new AsyncCompiler(): AsyncCompiler
  • Throws an error if constructed directly, instead of via initAsyncCompiler.

    Returns AsyncCompiler

    • Defined in js-api-doc/compile.d.ts:94

Methods

compileAsync

  • compileAsync(path: string, options?: Options<"async">): Promise<CompileResult>
  • The compileAsync method exposed through an Async Compiler instance while it is active. If this is called after dispose on the Async Compiler instance, an error will be thrown.

    During the Async Compiler instance's lifespan, given the same input, this will return an identical result to the compileAsync method exposed at the module root.

    Parameters

    • path: string
    • Optional options: Options<"async">

    Returns Promise<CompileResult>

    • Defined in js-api-doc/compile.d.ts:105

compileStringAsync

  • compileStringAsync(source: string, options?: StringOptions<"async">): Promise<CompileResult>
  • The compileStringAsync method exposed through an Async Compiler instance while it is active. If this is called after dispose on the Async Compiler instance, an error will be thrown.

    During the Async Compiler instance's lifespan, given the same input, this will return an identical result to the compileStringAsync method exposed at the module root.

    Parameters

    • source: string
    • Optional options: StringOptions<"async">

    Returns Promise<CompileResult>

    • Defined in js-api-doc/compile.d.ts:119

dispose

  • dispose(): Promise<void>
  • Ends the lifespan of this Async Compiler instance. After this is invoked, all subsequent calls to the Compiler instance's compileAsync or compileStringAsync methods will result in an error.

    Any compilations that are submitted before dispose will not be cancelled, and will be allowed to settle.

    After all compilations have been settled and Sass completes any internal task cleanup, dispose will resolve its promise.

    Returns Promise<void>

    • Defined in js-api-doc/compile.d.ts:135
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/AsyncCompiler

Spec-Zone.ru

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