Spec-Zone.ru › Sass

LegacyImporterThis

The value of this in the context of a LegacyImporter function.

Deprecated

This is only used by the legacy render and renderSync APIs. Use Importer with compile, compileString, compileAsync, and compileStringAsync instead.

Hierarchy

  • LegacyPluginThis
    • LegacyImporterThis
  • Defined in js-api-doc/legacy/importer.d.ts:11
Index

Properties

fromImport options

Properties

fromImport

fromImport: boolean
Compatibility:
Dart Sass
since 1.33.0
Node Sass
✗

Whether the importer is being invoked because of a Sass @import rule, as opposed to a @use or @forward rule.

This should only be used for determining whether or not to load import-only files.

  • Defined in js-api-doc/legacy/importer.d.ts:21

options

options: {
context: LegacyPluginThis;
data?: string;
file?: string;
includePaths: string;
indentType: 0 | 1;
indentWidth: number;
linefeed: "\r" | "\r\n" | "\n" | "\n\r";
precision: 10;
result: {
stats: {
entry: string;
start: number;
};
};
style: 1;
}

A partial representation of the options passed to render or renderSync.

Type declaration

  • context: LegacyPluginThis

    The same LegacyPluginThis instance that contains this object.

  • Optional data?: string

    The value passed to data.

  • Optional file?: string

    The value passed to file or file.

  • includePaths: string

    The value passed to includePaths separated by ";" on Windows or ":" on other operating systems. This always includes the current working directory as the first entry.

  • indentType: 0 | 1

    1 if indentType was "tab", 0 otherwise.

  • indentWidth: number

    The value passed to indentWidth, or 2 otherwise.

  • linefeed: "\r" | "\r\n" | "\n" | "\n\r"

    The value passed to linefeed, or "\n" otherwise.

  • precision: 10

    Always the number 10.

  • result: {
    stats: {
    entry: string;
    start: number;
    };
    }

    A partially-constructed LegacyResult object.

    • stats: {
      entry: string;
      start: number;
      }

      Partial information about the compilation in progress.

      • entry: string

        file if it was passed, otherwise the string "data".

      • start: number

        The number of milliseconds between 1 January 1970 at 00:00:00 UTC and the time at which Sass compilation began.

  • style: 1

    Always the number 1.

Inherited from LegacyPluginThis.options

  • Defined in js-api-doc/legacy/plugin_this.d.ts:15
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/interfaces/LegacyImporterThis

Spec-Zone.ru

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