sass 1.44.0 → 1.45.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,152 @@
1
+ import {RawSourceMap} from 'source-map-js';
2
+
3
+ import {Options, StringOptions} from './options';
4
+
5
+ /**
6
+ * The result of compiling Sass to CSS. Returned by [[compile]],
7
+ * [[compileAsync]], [[compileString]], and [[compileStringAsync]].
8
+ *
9
+ * @category Compile
10
+ */
11
+ export interface CompileResult {
12
+ /**
13
+ * The generated CSS.
14
+ *
15
+ * Note that this *never* includes a `sourceMapUrl` comment—it's up to the
16
+ * caller to determine where to save the source map and how to link to it from
17
+ * the stylesheet.
18
+ */
19
+ css: string;
20
+
21
+ /**
22
+ * The canonical URLs of all the stylesheets that were loaded during the
23
+ * Sass compilation. The order of these URLs is not guaranteed.
24
+ */
25
+ loadedUrls: URL[];
26
+
27
+ /**
28
+ * The object representation of the source map that maps locations in the
29
+ * generated CSS back to locations in the Sass source code.
30
+ *
31
+ * This typically uses absolute `file:` URLs to refer to Sass files, although
32
+ * this can be controlled by having a custom [[Importer]] return
33
+ * [[ImporterResult.sourceMapUrl]].
34
+ *
35
+ * This is set if and only if [[Options.sourceMap]] is `true`.
36
+ */
37
+ sourceMap?: RawSourceMap;
38
+ }
39
+
40
+ /**
41
+ * Synchronously compiles the Sass file at `path` to CSS. If it succeeds it
42
+ * returns a [[CompileResult]], and if it fails it throws an [[Exception]].
43
+ *
44
+ * This only allows synchronous [[Importer]]s and [[CustomFunction]]s.
45
+ *
46
+ * @example
47
+ *
48
+ * ```js
49
+ * const sass = require('sass');
50
+ *
51
+ * const result = sass.compile("style.scss");
52
+ * console.log(result.css);
53
+ * ```
54
+ *
55
+ * @category Compile
56
+ * @compatibility dart: "1.45.0", node: false
57
+ */
58
+ export function compile(path: string, options?: Options<'sync'>): CompileResult;
59
+
60
+ /**
61
+ * Asynchronously compiles the Sass file at `path` to CSS. Returns a promise
62
+ * that resolves with a [[CompileResult]] if it succeeds and rejects with an
63
+ * [[Exception]] if it fails.
64
+ *
65
+ * This only allows synchronous or asynchronous [[Importer]]s and
66
+ * [[CustomFunction]]s.
67
+ *
68
+ * **Heads up!** When using Dart Sass, **[[compile]] is almost twice as fast as
69
+ * [[compileAsync]]**, due to the overhead of making the entire evaluation
70
+ * process asynchronous.
71
+ *
72
+ * @example
73
+ *
74
+ * ```js
75
+ * const sass = require('sass');
76
+ *
77
+ * const result = await sass.compileAsync("style.scss");
78
+ * console.log(result.css);
79
+ * ```
80
+ *
81
+ * @category Compile
82
+ * @compatibility dart: "1.45.0", node: false
83
+ */
84
+ export function compileAsync(
85
+ path: string,
86
+ options?: Options<'async'>
87
+ ): Promise<CompileResult>;
88
+
89
+ /**
90
+ * Synchronously compiles a stylesheet whose contents is `source` to CSS. If it
91
+ * succeeds it returns a [[CompileResult]], and if it fails it throws an
92
+ * [[Exception]].
93
+ *
94
+ * This only allows synchronous [[Importer]]s and [[CustomFunction]]s.
95
+ *
96
+ * @example
97
+ *
98
+ * ```js
99
+ * const sass = require('sass');
100
+ *
101
+ * const result = sass.compileString(`
102
+ * h1 {
103
+ * font-size: 40px;
104
+ * code {
105
+ * font-face: Roboto Mono;
106
+ * }
107
+ * }`);
108
+ * console.log(result.css);
109
+ * ```
110
+ *
111
+ * @category Compile
112
+ * @compatibility dart: "1.45.0", node: false
113
+ */
114
+ export function compileString(
115
+ source: string,
116
+ options?: StringOptions<'sync'>
117
+ ): CompileResult;
118
+
119
+ /**
120
+ * Asynchronously compiles a stylesheet whose contents is `source` to CSS.
121
+ * Returns a promise that resolves with a [[CompileResult]] if it succeeds and
122
+ * rejects with an [[Exception]] if it fails.
123
+ *
124
+ * This only allows synchronous or asynchronous [[Importer]]s and
125
+ * [[CustomFunction]]s.
126
+ *
127
+ * **Heads up!** When using Dart Sass, **[[compile]] is almost twice as fast as
128
+ * [[compileAsync]]**, due to the overhead of making the entire evaluation
129
+ * process asynchronous.
130
+ *
131
+ * @example
132
+ *
133
+ * ```js
134
+ * const sass = require('sass');
135
+ *
136
+ * const result = await sass.compileStringAsync(`
137
+ * h1 {
138
+ * font-size: 40px;
139
+ * code {
140
+ * font-face: Roboto Mono;
141
+ * }
142
+ * }`);
143
+ * console.log(result.css);
144
+ * ```
145
+ *
146
+ * @category Compile
147
+ * @compatibility dart: "1.45.0", node: false
148
+ */
149
+ export function compileStringAsync(
150
+ source: string,
151
+ options?: StringOptions<'async'>
152
+ ): Promise<CompileResult>;
@@ -0,0 +1,41 @@
1
+ import {SourceSpan} from './logger';
2
+
3
+ /**
4
+ * An exception thrown because a Sass compilation failed.
5
+ *
6
+ * @category Other
7
+ */
8
+ export class Exception extends Error {
9
+ private constructor();
10
+
11
+ /**
12
+ * A human-friendly representation of the exception.
13
+ *
14
+ * Because many tools simply print `Error.message` directly, this includes not
15
+ * only the textual description of what went wrong (the [[sassMessage]]) but
16
+ * also an indication of where in the Sass stylesheet the error occurred (the
17
+ * [[span]]) and the Sass stack trace at the point of error (the
18
+ * [[sassStack]]).
19
+ */
20
+ message: string;
21
+
22
+ /**
23
+ * A textual description of what went wrong.
24
+ *
25
+ * Unlike [[message]], this does *not* include representations of [[span]] or
26
+ * [[sassStack]].
27
+ */
28
+ readonly sassMessage: string;
29
+
30
+ /**
31
+ * A human-friendly representation of the Sass stack trace at the point of
32
+ * error.
33
+ */
34
+ readonly sassStack: string;
35
+
36
+ /** The location the error occurred in the Sass file that triggered it. */
37
+ readonly span: SourceSpan;
38
+
39
+ /** Returns the same string as [[message]]. */
40
+ toString(): string;
41
+ }
@@ -0,0 +1,294 @@
1
+ import {Syntax} from './options';
2
+ import {PromiseOr} from './util/promise_or';
3
+
4
+ /**
5
+ * A special type of importer that redirects all loads to existing files on
6
+ * disk. Although this is less powerful than a full [[Importer]], it
7
+ * automatically takes care of Sass features like resolving partials and file
8
+ * extensions and of loading the file from disk.
9
+ *
10
+ * Like all importers, this implements custom Sass loading logic for [`@use`
11
+ * rules](https://sass-lang.com/documentation/at-rules/use) and [`@import`
12
+ * rules](https://sass-lang.com/documentation/at-rules/import). It can be passed
13
+ * to [[Options.importers]] or [[StringOptionsWithImporter.importer]].
14
+ *
15
+ * @typeParam sync - A `FileImporter<'sync'>`'s [[findFileUrl]] must return
16
+ * synchronously, but in return it can be passed to [[compile]] and
17
+ * [[compileString]] in addition to [[compileAsync]] and [[compileStringAsync]].
18
+ *
19
+ * A `FileImporter<'async'>`'s [[findFileUrl]] may either return synchronously
20
+ * or asynchronously, but it can only be used with [[compileAsync]] and
21
+ * [[compileStringAsync]].
22
+ *
23
+ * @example
24
+ *
25
+ * ```js
26
+ * const {fileURLToPath} = require('url');
27
+ *
28
+ * sass.compile('style.scss', {
29
+ * importers: [{
30
+ * // An importer that redirects relative URLs starting with "~" to
31
+ * // `node_modules`.
32
+ * findFileUrl(url) {
33
+ * if (!url.startsWith('~')) return null;
34
+ * return new URL(url.substring(1), pathToFileURL('node_modules'));
35
+ * }
36
+ * }]
37
+ * });
38
+ * ```
39
+ *
40
+ * @category Importer
41
+ */
42
+ export interface FileImporter<
43
+ sync extends 'sync' | 'async' = 'sync' | 'async'
44
+ > {
45
+ /**
46
+ * A callback that's called to partially resolve a load (such as
47
+ * [`@use`](https://sass-lang.com/documentation/at-rules/use) or
48
+ * [`@import`](https://sass-lang.com/documentation/at-rules/import)) to a file
49
+ * on disk.
50
+ *
51
+ * Unlike an [[Importer]], the compiler will automatically handle relative
52
+ * loads for a [[FileImporter]]. See [[Options.importers]] for more details on
53
+ * the way loads are resolved.
54
+ *
55
+ * @param url - The loaded URL. Since this might be relative, it's represented
56
+ * as a string rather than a [[URL]] object.
57
+ *
58
+ * @param options.fromImport - Whether this is being invoked because of a Sass
59
+ * `@import` rule, as opposed to a `@use` or `@forward` rule.
60
+ *
61
+ * This should *only* be used for determining whether or not to load
62
+ * [import-only files](https://sass-lang.com/documentation/at-rules/import#import-only-files).
63
+ *
64
+ * @returns An absolute `file:` URL if this importer recognizes the `url`.
65
+ * This may be only partially resolved: the compiler will automatically look
66
+ * for [partials](https://sass-lang.com/documentation/at-rules/use#partials),
67
+ * [index files](https://sass-lang.com/documentation/at-rules/use#index-files),
68
+ * and file extensions based on the returned URL. An importer may also return
69
+ * a fully resolved URL if it so chooses.
70
+ *
71
+ * If this importer doesn't recognize the URL, it should return `null` instead
72
+ * to allow other importers or {@link Options.loadPaths | load paths} to
73
+ * handle it.
74
+ *
75
+ * This may also return a `Promise`, but if it does the importer may only be
76
+ * passed to [[compileAsync]] and [[compileStringAsync]], not [[compile]] or
77
+ * [[compileString]].
78
+ *
79
+ * @throws any - If this importer recognizes `url` but determines that it's
80
+ * invalid, it may throw an exception that will be wrapped by Sass. If the
81
+ * exception object has a `message` property, it will be used as the wrapped
82
+ * exception's message; otherwise, the exception object's `toString()` will be
83
+ * used. This means it's safe for importers to throw plain strings.
84
+ */
85
+ findFileUrl(
86
+ url: string,
87
+ options: {fromImport: boolean}
88
+ ): PromiseOr<URL | null, sync>;
89
+
90
+ /** @hidden */
91
+ canonicalize?: never;
92
+ }
93
+
94
+ /**
95
+ * An object that implements custom Sass loading logic for [`@use`
96
+ * rules](https://sass-lang.com/documentation/at-rules/use) and [`@import`
97
+ * rules](https://sass-lang.com/documentation/at-rules/import). It can be passed
98
+ * to [[Options.importers]] or [[StringOptionsWithImporter.importer]].
99
+ *
100
+ * Importers that simply redirect to files on disk are encouraged to use the
101
+ * [[FileImporter]] interface instead.
102
+ *
103
+ * See [[Options.importers]] for more details on the way loads are resolved.
104
+ *
105
+ * @typeParam sync - An `Importer<'sync'>`'s [[canonicalize]] and [[load]] must
106
+ * return synchronously, but in return it can be passed to [[compile]] and
107
+ * [[compileString]] in addition to [[compileAsync]] and [[compileStringAsync]].
108
+ *
109
+ * An `Importer<'async'>`'s [[canonicalize]] and [[load]] may either return
110
+ * synchronously or asynchronously, but it can only be used with
111
+ * [[compileAsync]] and [[compileStringAsync]].
112
+ *
113
+ * @example Resolving a Load
114
+ *
115
+ * This is the process of resolving a load using a custom importer:
116
+ *
117
+ * - The compiler encounters `@use "db:foo/bar/baz"`.
118
+ * - It calls [[canonicalize]] with `"db:foo/bar/baz"`.
119
+ * - [[canonicalize]] returns `new URL("db:foo/bar/baz/_index.scss")`.
120
+ * - If the compiler has already loaded a stylesheet with this canonical URL, it
121
+ * re-uses the existing module.
122
+ * - Otherwise, it calls [[load]] with `new URL("db:foo/bar/baz/_index.scss")`.
123
+ * - [[load]] returns an [[ImporterResult]] that the compiler uses as the
124
+ * contents of the module.
125
+ *
126
+ * @example Code Sample
127
+ *
128
+ * ```js
129
+ * sass.compile('style.scss', {
130
+ * // An importer for URLs like `bgcolor:orange` that generates a
131
+ * // stylesheet with the given background color.
132
+ * importers: [{
133
+ * canonicalize(url) {
134
+ * if (!url.startsWith('bgcolor:')) return null;
135
+ * return new URL(url);
136
+ * },
137
+ * load(canonicalUrl) {
138
+ * return {
139
+ * contents: `body {background-color: ${canonicalUrl.pathname}}`,
140
+ * syntax: 'scss'
141
+ * };
142
+ * }
143
+ * }]
144
+ * });
145
+ * ```
146
+ *
147
+ * @category Importer
148
+ */
149
+ export interface Importer<sync extends 'sync' | 'async' = 'sync' | 'async'> {
150
+ /**
151
+ * If `url` is recognized by this importer, returns its canonical format.
152
+ *
153
+ * If Sass has already loaded a stylesheet with the returned canonical URL, it
154
+ * re-uses the existing parse tree (and the loaded module for `@use`). This
155
+ * means that importers **must ensure** that the same canonical URL always
156
+ * refers to the same stylesheet, *even across different importers*. As such,
157
+ * importers are encouraged to use unique URL schemes to disambiguate between
158
+ * one another.
159
+ *
160
+ * As much as possible, custom importers should canonicalize URLs the same way
161
+ * as the built-in filesystem importer:
162
+ *
163
+ * - The importer should look for stylesheets by adding the prefix `_` to the
164
+ * URL's basename, and by adding the extensions `.sass` and `.scss` if the
165
+ * URL doesn't already have one of those extensions. For example, if the
166
+ * URL was `foo/bar/baz`, the importer would look for:
167
+ * - `foo/bar/baz.sass`
168
+ * - `foo/bar/baz.scss`
169
+ * - `foo/bar/_baz.sass`
170
+ * - `foo/bar/_baz.scss`
171
+ *
172
+ * If the URL was `foo/bar/baz.scss`, the importer would just look for:
173
+ * - `foo/bar/baz.scss`
174
+ * - `foo/bar/_baz.scss`
175
+ *
176
+ * If the importer finds a stylesheet at more than one of these URLs, it
177
+ * should throw an exception indicating that the URL is ambiguous. Note that
178
+ * if the extension is explicitly specified, a stylesheet with the opposite
179
+ * extension is allowed to exist.
180
+ *
181
+ * - If none of the possible paths is valid, the importer should perform the
182
+ * same resolution on the URL followed by `/index`. In the example above,
183
+ * it would look for:
184
+ * - `foo/bar/baz/index.sass`
185
+ * - `foo/bar/baz/index.scss`
186
+ * - `foo/bar/baz/_index.sass`
187
+ * - `foo/bar/baz/_index.scss`
188
+ *
189
+ * As above, if the importer finds a stylesheet at more than one of these
190
+ * URLs, it should throw an exception indicating that the import is
191
+ * ambiguous.
192
+ *
193
+ * If no stylesheets are found, the importer should return `null`.
194
+ *
195
+ * Calling [[canonicalize]] multiple times with the same URL must return the
196
+ * same result. Calling [[canonicalize]] with a URL returned by a previous
197
+ * call to [[canonicalize]] must return that URL.
198
+ *
199
+ * Relative loads in stylesheets loaded from an importer are handled by
200
+ * resolving the loaded URL relative to the canonical URL of the stylesheet
201
+ * that contains it, and passing that URL back to the importer's
202
+ * [[canonicalize]] method. For example, suppose the "Resolving a Load"
203
+ * example {@link Importer | above} returned a stylesheet that contained
204
+ * `@use "mixins"`:
205
+ *
206
+ * - The compiler resolves the URL `mixins` relative to the current
207
+ * stylesheet's canonical URL `db:foo/bar/baz/_index.scss` to get
208
+ * `db:foo/bar/baz/mixins`.
209
+ * - It calls [[canonicalize]] with `"db:foo/bar/baz/mixins"`.
210
+ * - [[canonicalize]] returns `new URL("db:foo/bar/baz/_mixins.scss")`.
211
+ *
212
+ * Because of this, [[canonicalize]] must return a meaningful result when
213
+ * called with a URL relative to one returned by an earlier call to
214
+ * [[canonicalize]].
215
+ *
216
+ * @param url - The loaded URL. Since this might be relative, it's represented
217
+ * as a string rather than a [[URL]] object.
218
+ *
219
+ * @param options.fromImport - Whether this is being invoked because of a Sass
220
+ * `@import` rule, as opposed to a `@use` or `@forward` rule.
221
+ *
222
+ * This should *only* be used for determining whether or not to load
223
+ * [import-only files](https://sass-lang.com/documentation/at-rules/import#import-only-files).
224
+ *
225
+ * @returns An absolute URL if this importer recognizes the `url`, or `null`
226
+ * if it doesn't. If this returns `null`, other importers or {@link
227
+ * Options.loadPaths | load paths} may handle the load.
228
+ *
229
+ * This may also return a `Promise`, but if it does the importer may only be
230
+ * passed to [[compileAsync]] and [[compileStringAsync]], not [[compile]] or
231
+ * [[compileString]].
232
+ *
233
+ * @throws any - If this importer recognizes `url` but determines that it's
234
+ * invalid, it may throw an exception that will be wrapped by Sass. If the
235
+ * exception object has a `message` property, it will be used as the wrapped
236
+ * exception's message; otherwise, the exception object's `toString()` will be
237
+ * used. This means it's safe for importers to throw plain strings.
238
+ */
239
+ canonicalize(
240
+ url: string,
241
+ options: {fromImport: boolean}
242
+ ): PromiseOr<URL | null, sync>;
243
+
244
+ /**
245
+ * Loads the Sass text for the given `canonicalUrl`, or returns `null` if this
246
+ * importer can't find the stylesheet it refers to.
247
+ *
248
+ * @param canonicalUrl - The canonical URL of the stylesheet to load. This is
249
+ * guaranteed to come from a call to [[canonicalize]], although not every call
250
+ * to [[canonicalize]] will result in a call to [[load]].
251
+ *
252
+ * @returns The contents of the stylesheet at `canonicalUrl` if it can be
253
+ * loaded, or `null` if it can't.
254
+ *
255
+ * This may also return a `Promise`, but if it does the importer may only be
256
+ * passed to [[compileAsync]] and [[compileStringAsync]], not [[compile]] or
257
+ * [[compileString]].
258
+ *
259
+ * @throws any - If this importer finds a stylesheet at `url` but it fails to
260
+ * load for some reason, or if `url` is uniquely associated with this importer
261
+ * but doesn't refer to a real stylesheet, the importer may throw an exception
262
+ * that will be wrapped by Sass. If the exception object has a `message`
263
+ * property, it will be used as the wrapped exception's message; otherwise,
264
+ * the exception object's `toString()` will be used. This means it's safe for
265
+ * importers to throw plain strings.
266
+ */
267
+ load(canonicalUrl: URL): PromiseOr<ImporterResult | null, sync>;
268
+
269
+ /** @hidden */
270
+ findFileUrl?: never;
271
+ }
272
+
273
+ /**
274
+ * The result of successfully loading a stylesheet with an [[Importer]].
275
+ *
276
+ * @category Importer
277
+ */
278
+ export interface ImporterResult {
279
+ /** The contents of the stylesheet. */
280
+ contents: string;
281
+
282
+ /** The syntax with which to parse [[contents]]. */
283
+ syntax: Syntax;
284
+
285
+ /**
286
+ * The URL to use to link to the loaded stylesheet's source code in source
287
+ * maps. A `file:` URL is ideal because it's accessible to both browsers and
288
+ * other build tools, but an `http:` URL is also acceptable.
289
+ *
290
+ * If this isn't set, it defaults to a `data:` URL that contains the contents
291
+ * of the loaded stylesheet.
292
+ */
293
+ sourceMapUrl?: URL;
294
+ }
@@ -0,0 +1,76 @@
1
+ // This is a mirror of the JS API definitions in `spec/js-api`, but with comments
2
+ // written to provide user-facing documentation rather than to specify behavior for
3
+ // implementations.
4
+
5
+ export {
6
+ CompileResult,
7
+ compile,
8
+ compileAsync,
9
+ compileString,
10
+ compileStringAsync,
11
+ } from './compile';
12
+ export {Exception} from './exception';
13
+ export {FileImporter, Importer, ImporterResult} from './importer';
14
+ export {Logger, SourceSpan, SourceLocation} from './logger';
15
+ export {
16
+ CustomFunction,
17
+ Options,
18
+ OutputStyle,
19
+ StringOptions,
20
+ StringOptionsWithImporter,
21
+ StringOptionsWithoutImporter,
22
+ Syntax,
23
+ } from './options';
24
+ export {PromiseOr} from './util/promise_or';
25
+ export {
26
+ ListSeparator,
27
+ SassArgumentList,
28
+ SassBoolean,
29
+ SassColor,
30
+ SassFunction,
31
+ SassList,
32
+ SassMap,
33
+ SassNumber,
34
+ SassString,
35
+ Value,
36
+ sassFalse,
37
+ sassNull,
38
+ sassTrue,
39
+ } from './value';
40
+
41
+ // Legacy APIs
42
+ export {LegacyException} from './legacy/exception';
43
+ export {
44
+ LegacyAsyncFunction,
45
+ LegacySyncFunction,
46
+ LegacyFunction,
47
+ LegacyValue,
48
+ types,
49
+ } from './legacy/function';
50
+ export {
51
+ LegacyAsyncImporter,
52
+ LegacyImporter,
53
+ LegacyImporterResult,
54
+ LegacyImporterThis,
55
+ LegacySyncImporter,
56
+ } from './legacy/importer';
57
+ export {
58
+ LegacySharedOptions,
59
+ LegacyFileOptions,
60
+ LegacyStringOptions,
61
+ LegacyOptions,
62
+ } from './legacy/options';
63
+ export {LegacyPluginThis} from './legacy/plugin_this';
64
+ export {LegacyResult, render, renderSync} from './legacy/render';
65
+
66
+ /**
67
+ * Information about the Sass implementation. This always begins with a unique
68
+ * identifier for the Sass implementation, followed by U+0009 TAB, followed by
69
+ * its npm package version. Some implementations include additional information
70
+ * as well, but not in any standardized format.
71
+ *
72
+ * * For Dart Sass, the implementation name is `dart-sass`.
73
+ * * For Node Sass, the implementation name is `node-sass`.
74
+ * * For the embedded host, the implementation name is `sass-embedded`.
75
+ */
76
+ export const info: string;
@@ -0,0 +1,54 @@
1
+ /**
2
+ * The exception type thrown by [[renderSync]] and passed as the error to
3
+ * [[render]]'s callback.
4
+ *
5
+ * @category Legacy
6
+ * @deprecated This is only thrown by the legacy [[render]] and [[renderSync]]
7
+ * APIs. Use [[compile]], [[compileString]], [[compileAsync]], and
8
+ * [[compileStringAsync]] instead.
9
+ */
10
+ export interface LegacyException extends Error {
11
+ /**
12
+ * The error message. For Dart Sass, when possible this includes a highlighted
13
+ * indication of where in the source file the error occurred as well as the
14
+ * Sass stack trace.
15
+ */
16
+ message: string;
17
+
18
+ /**
19
+ * The error message. For Dart Sass, this is the same as the result of calling
20
+ * [[toString]], which is itself the same as [[message]] but with the prefix
21
+ * "Error:".
22
+ */
23
+ formatted: string;
24
+
25
+ /**
26
+ * The (1-based) line number on which the error occurred, if this exception is
27
+ * associated with a specific Sass file location.
28
+ */
29
+ line?: number;
30
+
31
+ /**
32
+ * The (1-based) column number within [[line]] at which the error occurred, if
33
+ * this exception is associated with a specific Sass file location.
34
+ */
35
+ column?: number;
36
+
37
+ /**
38
+ * Analogous to the exit code for an executable. `1` for an error caused by a
39
+ * Sass file, `3` for any other type of error.
40
+ */
41
+ status: number;
42
+
43
+ /**
44
+ * If this exception was caused by an error in a Sass file, this will
45
+ * represent the Sass file's location. It can be in one of three formats:
46
+ *
47
+ * * If the Sass file was loaded from disk, this is the path to that file.
48
+ * * If the Sass file was generated by an importer, this is its canonical URL.
49
+ * * If the Sass file was passed as [[LegacyStringOptions.data]] without a
50
+ * corresponding [[LegacyStringOptions.file]], this is the special string
51
+ * `"stdin"`.
52
+ */
53
+ file?: string;
54
+ }