sass 1.62.1 → 1.63.1

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.
@@ -2,8 +2,8 @@ import {LegacyPluginThis} from './plugin_this';
2
2
 
3
3
  /**
4
4
  * A synchronous callback that implements a custom Sass function. This can be
5
- * passed to [[LegacySharedOptions.functions]] for either [[render]] or
6
- * [[renderSync]].
5
+ * passed to {@link LegacySharedOptions.functions} for either {@link render} or
6
+ * {@link renderSync}.
7
7
  *
8
8
  * If this throws an error, Sass will treat that as the function failing with
9
9
  * that error message.
@@ -25,14 +25,15 @@ import {LegacyPluginThis} from './plugin_this';
25
25
  * ```
26
26
  *
27
27
  * @param args - One argument for each argument that's declared in the signature
28
- * that's passed to [[LegacySharedOptions.functions]]. If the signature [takes
29
- * arbitrary arguments](https://sass-lang.com/documentation/at-rules/function#taking-arbitrary-arguments),
28
+ * that's passed to {@link LegacySharedOptions.functions}. If the signature
29
+ * [takes arbitrary
30
+ * arguments](https://sass-lang.com/documentation/at-rules/function#taking-arbitrary-arguments),
30
31
  * they're passed as a single argument list in the last argument.
31
32
  *
32
33
  * @category Legacy
33
- * @deprecated This only works with the legacy [[render]] and [[renderSync]]
34
- * APIs. Use [[CustomFunction]] with [[compile]], [[compileString]],
35
- * [[compileAsync]], and [[compileStringAsync]] instead.
34
+ * @deprecated This only works with the legacy {@link render} and {@link
35
+ * renderSync} APIs. Use {@link CustomFunction} with {@link compile}, {@link
36
+ * compileString}, {@link compileAsync}, and {@link compileStringAsync} instead.
36
37
  */
37
38
  export type LegacySyncFunction = (
38
39
  this: LegacyPluginThis,
@@ -41,7 +42,7 @@ export type LegacySyncFunction = (
41
42
 
42
43
  /**
43
44
  * An asynchronous callback that implements a custom Sass function. This can be
44
- * passed to [[LegacySharedOptions.functions]], but only for [[render]].
45
+ * passed to {@link LegacySharedOptions.functions}, but only for {@link render}.
45
46
  *
46
47
  * An asynchronous function must return `undefined`. Its final argument will
47
48
  * always be a callback, which it should call with the result of the function
@@ -69,16 +70,16 @@ export type LegacySyncFunction = (
69
70
  * ```
70
71
  *
71
72
  * This is passed one argument for each argument that's declared in the
72
- * signature that's passed to [[LegacySharedOptions.functions]]. If the
73
+ * signature that's passed to {@link LegacySharedOptions.functions}. If the
73
74
  * signature [takes arbitrary
74
75
  * arguments](https://sass-lang.com/documentation/at-rules/function#taking-arbitrary-arguments),
75
76
  * they're passed as a single argument list in the last argument before the
76
77
  * callback.
77
78
  *
78
79
  * @category Legacy
79
- * @deprecated This only works with the legacy [[render]] and [[renderSync]]
80
- * APIs. Use [[CustomFunction]] with [[compile]], [[compileString]],
81
- * [[compileAsync]], and [[compileStringAsync]] instead.
80
+ * @deprecated This only works with the legacy {@link render} and {@link
81
+ * renderSync} APIs. Use {@link CustomFunction} with {@link compile}, {@link
82
+ * compileString}, {@link compileAsync}, and {@link compileStringAsync} instead.
82
83
  */
83
84
  export type LegacyAsyncFunction =
84
85
  | ((this: LegacyPluginThis, done: (result: LegacyValue) => void) => void)
@@ -133,34 +134,34 @@ export type LegacyAsyncFunction =
133
134
  ) => void);
134
135
 
135
136
  /**
136
- * The function called by a [[LegacyAsyncFunction]] to indicate that it's
137
+ * The function called by a {@link LegacyAsyncFunction} to indicate that it's
137
138
  * finished.
138
139
  *
139
- * @param result - If this is a [[LegacyValue]], that indicates that the
140
- * function call completed successfully. If it's a [[types.Error]], that
140
+ * @param result - If this is a {@link LegacyValue}, that indicates that the
141
+ * function call completed successfully. If it's a {@link types.Error}, that
141
142
  * indicates that the function call failed.
142
143
  *
143
144
  * @category Legacy
144
- * @deprecated This only works with the legacy [[render]] and [[renderSync]]
145
- * APIs. Use [[CustomFunction]] with [[compile]], [[compileString]],
146
- * [[compileAsync]], and [[compileStringAsync]] instead.
145
+ * @deprecated This only works with the legacy {@link render} and {@link
146
+ * renderSync} APIs. Use {@link CustomFunction} with {@link compile}, {@link
147
+ * compileString}, {@link compileAsync}, and {@link compileStringAsync} instead.
147
148
  */
148
149
  export type LegacyAsyncFunctionDone = (
149
150
  result: LegacyValue | types.Error
150
151
  ) => void;
151
152
 
152
153
  /**
153
- * A callback that implements a custom Sass function. For [[renderSync]], this
154
- * must be a [[LegacySyncFunction]] which returns its result directly; for
155
- * [[render]], it may be either a [[LegacySyncFunction]] or a
156
- * [[LegacyAsyncFunction]] which calls a callback with its result.
154
+ * A callback that implements a custom Sass function. For {@link renderSync},
155
+ * this must be a {@link LegacySyncFunction} which returns its result directly;
156
+ * for {@link render}, it may be either a {@link LegacySyncFunction} or a {@link
157
+ * LegacyAsyncFunction} which calls a callback with its result.
157
158
  *
158
- * See [[LegacySharedOptions.functions]] for more details.
159
+ * See {@link LegacySharedOptions.functions} for more details.
159
160
  *
160
161
  * @category Legacy
161
- * @deprecated This only works with the legacy [[render]] and [[renderSync]]
162
- * APIs. Use [[CustomFunction]] with [[compile]], [[compileString]],
163
- * [[compileAsync]], and [[compileStringAsync]] instead.
162
+ * @deprecated This only works with the legacy {@link render} and {@link
163
+ * renderSync} APIs. Use {@link CustomFunction} with {@link compile}, {@link
164
+ * compileString}, {@link compileAsync}, and {@link compileStringAsync} instead.
164
165
  */
165
166
  export type LegacyFunction<sync extends 'sync' | 'async'> = sync extends 'async'
166
167
  ? LegacySyncFunction | LegacyAsyncFunction
@@ -168,12 +169,12 @@ export type LegacyFunction<sync extends 'sync' | 'async'> = sync extends 'async'
168
169
 
169
170
  /**
170
171
  * A type representing all the possible values that may be passed to or returned
171
- * from a [[LegacyFunction]].
172
+ * from a {@link LegacyFunction}.
172
173
  *
173
174
  * @category Legacy
174
- * @deprecated This only works with the legacy [[render]] and [[renderSync]]
175
- * APIs. Use [[Value]] with [[compile]], [[compileString]], [[compileAsync]],
176
- * and [[compileStringAsync]] instead.
175
+ * @deprecated This only works with the legacy {@link render} and {@link
176
+ * renderSync} APIs. Use {@link Value} with {@link compile}, {@link
177
+ * compileString}, {@link compileAsync}, and {@link compileStringAsync} instead.
177
178
  */
178
179
  export type LegacyValue =
179
180
  | types.Null
@@ -188,9 +189,9 @@ export type LegacyValue =
188
189
  * A shorthand for `sass.types.Boolean.TRUE`.
189
190
  *
190
191
  * @category Legacy
191
- * @deprecated This only works with the legacy [[render]] and [[renderSync]]
192
- * APIs. Use [[sassTrue]] with [[compile]], [[compileString]], [[compileAsync]],
193
- * and [[compileStringAsync]] instead.
192
+ * @deprecated This only works with the legacy {@link render} and {@link
193
+ * renderSync} APIs. Use {@link sassTrue} with {@link compile}, {@link
194
+ * compileString}, {@link compileAsync}, and {@link compileStringAsync} instead.
194
195
  */
195
196
  export const TRUE: types.Boolean<true>;
196
197
 
@@ -198,9 +199,9 @@ export const TRUE: types.Boolean<true>;
198
199
  * A shorthand for `sass.types.Boolean.FALSE`.
199
200
  *
200
201
  * @category Legacy
201
- * @deprecated This only works with the legacy [[render]] and [[renderSync]]
202
- * APIs. Use [[sassFalse]] with [[compile]], [[compileString]], [[compileAsync]],
203
- * and [[compileStringAsync]] instead.
202
+ * @deprecated This only works with the legacy {@link render} and {@link
203
+ * renderSync} APIs. Use {@link sassFalse} with {@link compile}, {@link
204
+ * compileString}, {@link compileAsync}, and {@link compileStringAsync} instead.
204
205
  */
205
206
  export const FALSE: types.Boolean<false>;
206
207
 
@@ -208,9 +209,9 @@ export const FALSE: types.Boolean<false>;
208
209
  * A shorthand for `sass.types.Null.NULL`.
209
210
  *
210
211
  * @category Legacy
211
- * @deprecated This only works with the legacy [[render]] and [[renderSync]]
212
- * APIs. Use [[sassNull]] with [[compile]], [[compileString]], [[compileAsync]],
213
- * and [[compileStringAsync]] instead.
212
+ * @deprecated This only works with the legacy {@link render} and {@link
213
+ * renderSync} APIs. Use {@link sassNull} with {@link compile}, {@link
214
+ * compileString}, {@link compileAsync}, and {@link compileStringAsync} instead.
214
215
  */
215
216
  export const NULL: types.Null;
216
217
 
@@ -218,15 +219,15 @@ export const NULL: types.Null;
218
219
  * The namespace for value types used in the legacy function API.
219
220
  *
220
221
  * @category Legacy
221
- * @deprecated This only works with the legacy [[render]] and [[renderSync]]
222
- * APIs. Use [[Value]] with [[compile]], [[compileString]], [[compileAsync]],
223
- * and [[compileStringAsync]] instead.
222
+ * @deprecated This only works with the legacy {@link render} and {@link
223
+ * renderSync} APIs. Use {@link Value} with {@link compile}, {@link
224
+ * compileString}, {@link compileAsync}, and {@link compileStringAsync} instead.
224
225
  */
225
226
  export namespace types {
226
227
  /**
227
228
  * The class for Sass's singleton [`null`
228
229
  * value](https://sass-lang.com/documentation/values/null). The value itself
229
- * can be accessed through the [[NULL]] field.
230
+ * can be accessed through the {@link NULL} field.
230
231
  */
231
232
  export class Null {
232
233
  /** Sass's singleton `null` value. */
@@ -280,13 +281,13 @@ export namespace types {
280
281
  * Destructively modifies this number by setting its numeric value to
281
282
  * `value`, independent of its units.
282
283
  *
283
- * @deprecated Use [[constructor]] instead.
284
+ * @deprecated Use {@link constructor} instead.
284
285
  */
285
286
  setValue(value: number): void;
286
287
 
287
288
  /**
288
289
  * Returns a string representation of this number's units. Complex units are
289
- * returned in the same format that [[constructor]] accepts them.
290
+ * returned in the same format that {@link constructor} accepts them.
290
291
  *
291
292
  * @example
292
293
  *
@@ -303,9 +304,9 @@ export namespace types {
303
304
  /**
304
305
  * Destructively modifies this number by setting its units to `unit`,
305
306
  * independent of its numeric value. Complex units are specified in the same
306
- * format as [[constructor]].
307
+ * format as {@link constructor}.
307
308
  *
308
- * @deprecated Use [[constructor]] instead.
309
+ * @deprecated Use {@link constructor} instead.
309
310
  */
310
311
  setUnit(unit: string): void;
311
312
  }
@@ -360,7 +361,7 @@ export namespace types {
360
361
  * **Heads up!** Even if the string was originally quoted, this will cause
361
362
  * it to become unquoted.
362
363
  *
363
- * @deprecated Use [[constructor]] instead.
364
+ * @deprecated Use {@link constructor} instead.
364
365
  */
365
366
  setValue(value: string): void;
366
367
  }
@@ -373,7 +374,7 @@ export namespace types {
373
374
  * by treating `false` and `null` as falsey and everything else as truthy.
374
375
  *
375
376
  * **Heads up!** Boolean values can't be constructed, they can only be
376
- * accessed through the [[TRUE]] and [[FALSE]] constants.
377
+ * accessed through the {@link TRUE} and {@link FALSE} constants.
377
378
  */
378
379
  export class Boolean<T extends boolean = boolean> {
379
380
  /**
@@ -451,7 +452,7 @@ export namespace types {
451
452
  * Sets the red channel of the color. The value must be an integer between 0
452
453
  * and 255 (inclusive).
453
454
  *
454
- * @deprecated Use [[constructor]] instead.
455
+ * @deprecated Use {@link constructor} instead.
455
456
  */
456
457
  setR(value: number): void;
457
458
 
@@ -474,7 +475,7 @@ export namespace types {
474
475
  * Sets the green channel of the color. The value must be an integer between
475
476
  * 0 and 255 (inclusive).
476
477
  *
477
- * @deprecated Use [[constructor]] instead.
478
+ * @deprecated Use {@link constructor} instead.
478
479
  */
479
480
  setG(value: number): void;
480
481
 
@@ -497,7 +498,7 @@ export namespace types {
497
498
  * Sets the blue channel of the color. The value must be an integer between
498
499
  * 0 and 255 (inclusive).
499
500
  *
500
- * @deprecated Use [[constructor]] instead.
501
+ * @deprecated Use {@link constructor} instead.
501
502
  */
502
503
  setB(value: number): void;
503
504
 
@@ -520,7 +521,7 @@ export namespace types {
520
521
  * Sets the alpha channel of the color. The value must be between 0 and 1
521
522
  * (inclusive).
522
523
  *
523
- * @deprecated Use [[constructor]] instead.
524
+ * @deprecated Use {@link constructor} instead.
524
525
  */
525
526
  setA(value: number): void;
526
527
  }
@@ -537,8 +538,8 @@ export namespace types {
537
538
  * Creates a new Sass list.
538
539
  *
539
540
  * **Heads up!** The initial values of the list elements are undefined.
540
- * These elements must be set using [[setValue]] before accessing them or
541
- * passing the list back to Sass.
541
+ * These elements must be set using {@link setValue} before accessing them
542
+ * or passing the list back to Sass.
542
543
  *
543
544
  * @example
544
545
  *
@@ -643,8 +644,8 @@ export namespace types {
643
644
  * Creates a new Sass map.
644
645
  *
645
646
  * **Heads up!** The initial keys and values of the map are undefined. They
646
- * must be set using [[setKey]] and [[setValue]] before accessing them or
647
- * passing the map back to Sass.
647
+ * must be set using {@link setKey} and {@link setValue} before accessing
648
+ * them or passing the map back to Sass.
648
649
  *
649
650
  * @example
650
651
  *
@@ -748,7 +749,7 @@ export namespace types {
748
749
  /**
749
750
  * An error that can be returned from a Sass function to signal that it
750
751
  * encountered an error. This is the only way to signal an error
751
- * asynchronously from a [[LegacyAsyncFunction]].
752
+ * asynchronously from a {@link LegacyAsyncFunction}.
752
753
  */
753
754
  export class Error {
754
755
  constructor(message: string);
@@ -1,12 +1,12 @@
1
1
  import {LegacyPluginThis} from './plugin_this';
2
2
 
3
3
  /**
4
- * The value of `this` in the context of a [[LegacyImporter]] function.
4
+ * The value of `this` in the context of a {@link LegacyImporter} function.
5
5
  *
6
6
  * @category Legacy
7
- * @deprecated This is only used by the legacy [[render]] and [[renderSync]]
8
- * APIs. Use [[Importer]] with [[compile]], [[compileString]], [[compileAsync]],
9
- * and [[compileStringAsync]] instead.
7
+ * @deprecated This is only used by the legacy {@link render} and {@link
8
+ * renderSync} APIs. Use {@link Importer} with {@link compile}, {@link
9
+ * compileString}, {@link compileAsync}, and {@link compileStringAsync} instead.
10
10
  */
11
11
  interface LegacyImporterThis extends LegacyPluginThis {
12
12
  /**
@@ -22,8 +22,8 @@ interface LegacyImporterThis extends LegacyPluginThis {
22
22
  }
23
23
 
24
24
  /**
25
- * The result of running a [[LegacyImporter]]. It must be one of the following
26
- * types:
25
+ * The result of running a {@link LegacyImporter}. It must be one of the
26
+ * following types:
27
27
  *
28
28
  * * An object with the key `contents` whose value is the contents of a stylesheet
29
29
  * (in SCSS syntax). This causes Sass to load that stylesheet’s contents.
@@ -38,9 +38,9 @@ interface LegacyImporterThis extends LegacyPluginThis {
38
38
  * object, indicating that importing failed.
39
39
  *
40
40
  * @category Legacy
41
- * @deprecated This only works with the legacy [[render]] and [[renderSync]]
42
- * APIs. Use [[ImporterResult]] with [[compile]], [[compileString]],
43
- * [[compileAsync]], and [[compileStringAsync]] instead.
41
+ * @deprecated This only works with the legacy {@link render} and {@link
42
+ * renderSync} APIs. Use {@link ImporterResult} with {@link compile}, {@link
43
+ * compileString}, {@link compileAsync}, and {@link compileStringAsync} instead.
44
44
  */
45
45
  export type LegacyImporterResult =
46
46
  | {file: string}
@@ -52,10 +52,10 @@ export type LegacyImporterResult =
52
52
  * A synchronous callback that implements custom Sass loading logic for
53
53
  * [`@import` rules](https://sass-lang.com/documentation/at-rules/import) and
54
54
  * [`@use` rules](https://sass-lang.com/documentation/at-rules/use). This can be
55
- * passed to [[LegacySharedOptions.importer]] for either [[render]] or
56
- * [[renderSync]].
55
+ * passed to {@link LegacySharedOptions.importer} for either {@link render} or
56
+ * {@link renderSync}.
57
57
  *
58
- * See [[LegacySharedOptions.importer]] for more detailed documentation.
58
+ * See {@link LegacySharedOptions.importer} for more detailed documentation.
59
59
  *
60
60
  * ```js
61
61
  * sass.renderSync({
@@ -85,9 +85,9 @@ export type LegacyImporterResult =
85
85
  * * If the stylesheet came from the data option, it’s the string "stdin".
86
86
  *
87
87
  * @category Legacy
88
- * @deprecated This only works with the legacy [[render]] and [[renderSync]]
89
- * APIs. Use [[Importer]] with [[compile]], [[compileString]], [[compileAsync]],
90
- * and [[compileStringAsync]] instead.
88
+ * @deprecated This only works with the legacy {@link render} and {@link
89
+ * renderSync} APIs. Use {@link Importer} with {@link compile}, {@link
90
+ * compileString}, {@link compileAsync}, and {@link compileStringAsync} instead.
91
91
  */
92
92
  type LegacySyncImporter = (
93
93
  this: LegacyImporterThis,
@@ -99,13 +99,13 @@ type LegacySyncImporter = (
99
99
  * An asynchronous callback that implements custom Sass loading logic for
100
100
  * [`@import` rules](https://sass-lang.com/documentation/at-rules/import) and
101
101
  * [`@use` rules](https://sass-lang.com/documentation/at-rules/use). This can be
102
- * passed to [[LegacySharedOptions.importer]] for either [[render]] or
103
- * [[renderSync]].
102
+ * passed to {@link LegacySharedOptions.importer} for either {@link render} or
103
+ * {@link renderSync}.
104
104
  *
105
105
  * An asynchronous importer must return `undefined`, and then call `done` with
106
- * the result of its [[LegacyImporterResult]] once it's done running.
106
+ * the result of its {@link LegacyImporterResult} once it's done running.
107
107
  *
108
- * See [[LegacySharedOptions.importer]] for more detailed documentation.
108
+ * See {@link LegacySharedOptions.importer} for more detailed documentation.
109
109
  *
110
110
  * ```js
111
111
  * sass.render({
@@ -137,9 +137,9 @@ type LegacySyncImporter = (
137
137
  * @param done - The callback to call once the importer has finished running.
138
138
  *
139
139
  * @category Legacy
140
- * @deprecated This only works with the legacy [[render]] and [[renderSync]]
141
- * APIs. Use [[Importer]] with [[compile]], [[compileString]], [[compileAsync]],
142
- * and [[compileStringAsync]] instead.
140
+ * @deprecated This only works with the legacy {@link render} and {@link
141
+ * renderSync} APIs. Use {@link Importer} with {@link compile}, {@link
142
+ * compileString}, {@link compileAsync}, and {@link compileStringAsync} instead.
143
143
  */
144
144
  type LegacyAsyncImporter = (
145
145
  this: LegacyImporterThis,
@@ -151,17 +151,18 @@ type LegacyAsyncImporter = (
151
151
  /**
152
152
  * A callback that implements custom Sass loading logic for [`@import`
153
153
  * rules](https://sass-lang.com/documentation/at-rules/import) and [`@use`
154
- * rules](https://sass-lang.com/documentation/at-rules/use). For [[renderSync]],
155
- * this must be a [[LegacySyncImporter]] which returns its result directly; for
156
- * [[render]], it may be either a [[LegacySyncImporter]] or a
157
- * [[LegacyAsyncImporter]] which calls a callback with its result.
154
+ * rules](https://sass-lang.com/documentation/at-rules/use). For {@link
155
+ * renderSync}, this must be a {@link LegacySyncImporter} which returns its
156
+ * result directly; for {@link render}, it may be either a {@link
157
+ * LegacySyncImporter} or a {@link LegacyAsyncImporter} which calls a callback
158
+ * with its result.
158
159
  *
159
- * See [[LegacySharedOptions.importer]] for more details.
160
+ * See {@link LegacySharedOptions.importer} for more details.
160
161
  *
161
162
  * @category Legacy
162
- * @deprecated This only works with the legacy [[render]] and [[renderSync]]
163
- * APIs. Use [[Importer]] with [[compile]], [[compileString]], [[compileAsync]],
164
- * and [[compileStringAsync]] instead.
163
+ * @deprecated This only works with the legacy {@link render} and {@link
164
+ * renderSync} APIs. Use {@link Importer} with {@link compile}, {@link
165
+ * compileString}, {@link compileAsync}, and {@link compileStringAsync} instead.
165
166
  */
166
167
  export type LegacyImporter<sync = 'sync' | 'async'> = sync extends 'async'
167
168
  ? LegacySyncImporter | LegacyAsyncImporter