sass 1.45.0-rc.2 → 1.46.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.
- package/LICENSE +4 -3
- package/README.md +46 -41
- package/package.json +1 -1
- package/sass.dart.js +34923 -35343
- package/types/compile.d.ts +0 -1
- package/types/importer.d.ts +0 -2
- package/types/index.d.ts +2 -1
- package/types/legacy/function.d.ts +80 -6
- package/types/legacy/options.d.ts +1 -1
- package/types/legacy/plugin_this.d.ts +3 -0
- package/types/logger/source_span.d.ts +0 -2
- package/types/options.d.ts +0 -2
package/types/compile.d.ts
CHANGED
package/types/importer.d.ts
CHANGED
package/types/index.d.ts
CHANGED
|
@@ -68,9 +68,10 @@ export type LegacySyncFunction = (
|
|
|
68
68
|
* });
|
|
69
69
|
* ```
|
|
70
70
|
*
|
|
71
|
-
*
|
|
72
|
-
* that's passed to [[LegacySharedOptions.functions]]. If the
|
|
73
|
-
*
|
|
71
|
+
* 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 [takes arbitrary
|
|
74
|
+
* arguments](https://sass-lang.com/documentation/at-rules/function#taking-arbitrary-arguments),
|
|
74
75
|
* they're passed as a single argument list in the last argument before the
|
|
75
76
|
* callback.
|
|
76
77
|
*
|
|
@@ -79,9 +80,73 @@ export type LegacySyncFunction = (
|
|
|
79
80
|
* APIs. Use [[CustomFunction]] with [[compile]], [[compileString]],
|
|
80
81
|
* [[compileAsync]], and [[compileStringAsync]] instead.
|
|
81
82
|
*/
|
|
82
|
-
export type LegacyAsyncFunction =
|
|
83
|
-
this: LegacyPluginThis,
|
|
84
|
-
|
|
83
|
+
export type LegacyAsyncFunction =
|
|
84
|
+
| ((this: LegacyPluginThis, done: (result: LegacyValue) => void) => void)
|
|
85
|
+
| ((
|
|
86
|
+
this: LegacyPluginThis,
|
|
87
|
+
arg1: LegacyValue,
|
|
88
|
+
done: LegacyAsyncFunctionDone
|
|
89
|
+
) => void)
|
|
90
|
+
| ((
|
|
91
|
+
this: LegacyPluginThis,
|
|
92
|
+
arg1: LegacyValue,
|
|
93
|
+
arg2: LegacyValue,
|
|
94
|
+
done: LegacyAsyncFunctionDone
|
|
95
|
+
) => void)
|
|
96
|
+
| ((
|
|
97
|
+
this: LegacyPluginThis,
|
|
98
|
+
arg1: LegacyValue,
|
|
99
|
+
arg2: LegacyValue,
|
|
100
|
+
arg3: LegacyValue,
|
|
101
|
+
done: LegacyAsyncFunctionDone
|
|
102
|
+
) => void)
|
|
103
|
+
| ((
|
|
104
|
+
this: LegacyPluginThis,
|
|
105
|
+
arg1: LegacyValue,
|
|
106
|
+
arg2: LegacyValue,
|
|
107
|
+
arg3: LegacyValue,
|
|
108
|
+
arg4: LegacyValue,
|
|
109
|
+
done: LegacyAsyncFunctionDone
|
|
110
|
+
) => void)
|
|
111
|
+
| ((
|
|
112
|
+
this: LegacyPluginThis,
|
|
113
|
+
arg1: LegacyValue,
|
|
114
|
+
arg2: LegacyValue,
|
|
115
|
+
arg3: LegacyValue,
|
|
116
|
+
arg4: LegacyValue,
|
|
117
|
+
arg5: LegacyValue,
|
|
118
|
+
done: LegacyAsyncFunctionDone
|
|
119
|
+
) => void)
|
|
120
|
+
| ((
|
|
121
|
+
this: LegacyPluginThis,
|
|
122
|
+
arg1: LegacyValue,
|
|
123
|
+
arg2: LegacyValue,
|
|
124
|
+
arg3: LegacyValue,
|
|
125
|
+
arg4: LegacyValue,
|
|
126
|
+
arg5: LegacyValue,
|
|
127
|
+
arg6: LegacyValue,
|
|
128
|
+
done: LegacyAsyncFunctionDone
|
|
129
|
+
) => void)
|
|
130
|
+
| ((
|
|
131
|
+
this: LegacyPluginThis,
|
|
132
|
+
...args: [...LegacyValue[], LegacyAsyncFunctionDone]
|
|
133
|
+
) => void);
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* The function called by a [[LegacyAsyncFunction]] to indicate that it's
|
|
137
|
+
* finished.
|
|
138
|
+
*
|
|
139
|
+
* @param result - If this is a [[LegacyValue]], that indicates that the
|
|
140
|
+
* function call completed successfully. If it's a [[types.Error]], that
|
|
141
|
+
* indicates that the function call failed.
|
|
142
|
+
*
|
|
143
|
+
* @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.
|
|
147
|
+
*/
|
|
148
|
+
export type LegacyAsyncFunctionDone = (
|
|
149
|
+
result: LegacyValue | types.Error
|
|
85
150
|
) => void;
|
|
86
151
|
|
|
87
152
|
/**
|
|
@@ -649,4 +714,13 @@ export namespace types {
|
|
|
649
714
|
*/
|
|
650
715
|
getLength(): number;
|
|
651
716
|
}
|
|
717
|
+
|
|
718
|
+
/**
|
|
719
|
+
* An error that can be returned from a Sass function to signal that it
|
|
720
|
+
* encountered an error. This is the only way to signal an error
|
|
721
|
+
* asynchronously from a [[LegacyAsyncFunction]].
|
|
722
|
+
*/
|
|
723
|
+
export class Error {
|
|
724
|
+
constructor(message: string);
|
|
725
|
+
}
|
|
652
726
|
}
|
|
@@ -13,6 +13,9 @@ export interface LegacyPluginThis {
|
|
|
13
13
|
* [[renderSync]].
|
|
14
14
|
*/
|
|
15
15
|
options: {
|
|
16
|
+
/** The same [[LegacyPluginThis]] instance that contains this object. */
|
|
17
|
+
context: LegacyPluginThis;
|
|
18
|
+
|
|
16
19
|
/**
|
|
17
20
|
* The value passed to [[LegacyFileOptions.file]] or
|
|
18
21
|
* [[LegacyStringOptions.file]].
|