| 1 |
/** |
| 2 |
* All of the deprecation types currently used by Sass. |
| 3 |
* |
| 4 |
* Any of these IDs or the deprecation objects they point to can be passed to |
| 5 |
* `fatalDeprecations`, `futureDeprecations`, or `silenceDeprecations`. |
| 6 |
*/ |
| 7 |
export interface Deprecations { |
| 8 |
// START AUTOGENERATED LIST |
| 9 |
// Checksum: 1e05e728d95255e2e9fadbe9696baf751fc7ef66 |
| 10 |
|
| 11 |
/** |
| 12 |
* Deprecation for passing a string directly to meta.call(). |
| 13 |
* |
| 14 |
* This deprecation was active in the first version of Dart Sass. |
| 15 |
*/ |
| 16 |
'call-string': Deprecation<'call-string'>; |
| 17 |
|
| 18 |
/** |
| 19 |
* Deprecation for @elseif. |
| 20 |
* |
| 21 |
* This deprecation became active in Dart Sass 1.3.2. |
| 22 |
*/ |
| 23 |
elseif: Deprecation<'elseif'>; |
| 24 |
|
| 25 |
/** |
| 26 |
* Deprecation for @-moz-document. |
| 27 |
* |
| 28 |
* This deprecation became active in Dart Sass 1.7.2. |
| 29 |
*/ |
| 30 |
'moz-document': Deprecation<'moz-document'>; |
| 31 |
|
| 32 |
/** |
| 33 |
* Deprecation for imports using relative canonical URLs. |
| 34 |
* |
| 35 |
* This deprecation became active in Dart Sass 1.14.2. |
| 36 |
*/ |
| 37 |
'relative-canonical': Deprecation<'relative-canonical'>; |
| 38 |
|
| 39 |
/** |
| 40 |
* Deprecation for declaring new variables with !global. |
| 41 |
* |
| 42 |
* This deprecation became active in Dart Sass 1.17.2. |
| 43 |
*/ |
| 44 |
'new-global': Deprecation<'new-global'>; |
| 45 |
|
| 46 |
/** |
| 47 |
* Deprecation for using color module functions in place of plain CSS functions. |
| 48 |
* |
| 49 |
* This deprecation became active in Dart Sass 1.23.0. |
| 50 |
*/ |
| 51 |
'color-module-compat': Deprecation<'color-module-compat'>; |
| 52 |
|
| 53 |
/** |
| 54 |
* Deprecation for / operator for division. |
| 55 |
* |
| 56 |
* This deprecation became active in Dart Sass 1.33.0. |
| 57 |
*/ |
| 58 |
'slash-div': Deprecation<'slash-div'>; |
| 59 |
|
| 60 |
/** |
| 61 |
* Deprecation for leading, trailing, and repeated combinators. |
| 62 |
* |
| 63 |
* This deprecation became active in Dart Sass 1.54.0. |
| 64 |
*/ |
| 65 |
'bogus-combinators': Deprecation<'bogus-combinators'>; |
| 66 |
|
| 67 |
/** |
| 68 |
* Deprecation for ambiguous + and - operators. |
| 69 |
* |
| 70 |
* This deprecation became active in Dart Sass 1.55.0. |
| 71 |
*/ |
| 72 |
'strict-unary': Deprecation<'strict-unary'>; |
| 73 |
|
| 74 |
/** |
| 75 |
* Deprecation for passing invalid units to built-in functions. |
| 76 |
* |
| 77 |
* This deprecation became active in Dart Sass 1.56.0. |
| 78 |
*/ |
| 79 |
'function-units': Deprecation<'function-units'>; |
| 80 |
|
| 81 |
/** |
| 82 |
* Deprecation for using !default or !global multiple times for one variable. |
| 83 |
* |
| 84 |
* This deprecation became active in Dart Sass 1.62.0. |
| 85 |
*/ |
| 86 |
'duplicate-var-flags': Deprecation<'duplicate-var-flags'>; |
| 87 |
|
| 88 |
/** |
| 89 |
* Deprecation for passing null as alpha in the JS API. |
| 90 |
* |
| 91 |
* This deprecation became active in Dart Sass 1.62.3. |
| 92 |
*/ |
| 93 |
'null-alpha': Deprecation<'null-alpha'>; |
| 94 |
|
| 95 |
/** |
| 96 |
* Deprecation for passing percentages to the Sass abs() function. |
| 97 |
* |
| 98 |
* This deprecation became active in Dart Sass 1.65.0. |
| 99 |
*/ |
| 100 |
'abs-percent': Deprecation<'abs-percent'>; |
| 101 |
|
| 102 |
/** |
| 103 |
* Deprecation for using the current working directory as an implicit load path. |
| 104 |
* |
| 105 |
* This deprecation became active in Dart Sass 1.73.0. |
| 106 |
*/ |
| 107 |
'fs-importer-cwd': Deprecation<'fs-importer-cwd'>; |
| 108 |
|
| 109 |
/** |
| 110 |
* Deprecation for function and mixin names beginning with --. |
| 111 |
* |
| 112 |
* This deprecation became active in Dart Sass 1.76.0. |
| 113 |
* It became obsolete in Dart Sass 1.94.0. |
| 114 |
*/ |
| 115 |
'css-function-mixin': Deprecation<'css-function-mixin'>; |
| 116 |
|
| 117 |
/** |
| 118 |
* Deprecation for declarations after or between nested rules. |
| 119 |
* |
| 120 |
* This deprecation became active in Dart Sass 1.77.7. |
| 121 |
* It became obsolete in Dart Sass 1.92.0. |
| 122 |
*/ |
| 123 |
'mixed-decls': Deprecation<'mixed-decls'>; |
| 124 |
|
| 125 |
/** |
| 126 |
* Deprecation for meta.feature-exists |
| 127 |
* |
| 128 |
* This deprecation became active in Dart Sass 1.78.0. |
| 129 |
*/ |
| 130 |
'feature-exists': Deprecation<'feature-exists'>; |
| 131 |
|
| 132 |
/** |
| 133 |
* Deprecation for certain uses of built-in sass:color functions. |
| 134 |
* |
| 135 |
* This deprecation became active in Dart Sass 1.79.0. |
| 136 |
*/ |
| 137 |
'color-4-api': Deprecation<'color-4-api'>; |
| 138 |
|
| 139 |
/** |
| 140 |
* Deprecation for using global color functions instead of sass:color. |
| 141 |
* |
| 142 |
* This deprecation became active in Dart Sass 1.79.0. |
| 143 |
*/ |
| 144 |
'color-functions': Deprecation<'color-functions'>; |
| 145 |
|
| 146 |
/** |
| 147 |
* Deprecation for legacy JS API. |
| 148 |
* |
| 149 |
* This deprecation became active in Dart Sass 1.79.0. |
| 150 |
*/ |
| 151 |
'legacy-js-api': Deprecation<'legacy-js-api'>; |
| 152 |
|
| 153 |
/** |
| 154 |
* Deprecation for @import rules. |
| 155 |
* |
| 156 |
* This deprecation became active in Dart Sass 1.80.0. |
| 157 |
*/ |
| 158 |
import: Deprecation<'import'>; |
| 159 |
|
| 160 |
/** |
| 161 |
* Deprecation for global built-in functions that are available in sass: modules. |
| 162 |
* |
| 163 |
* This deprecation became active in Dart Sass 1.80.0. |
| 164 |
*/ |
| 165 |
'global-builtin': Deprecation<'global-builtin'>; |
| 166 |
|
| 167 |
/** |
| 168 |
* Deprecation for functions named "type". |
| 169 |
* |
| 170 |
* This deprecation became active in Dart Sass 1.86.0. |
| 171 |
* It became obsolete in Dart Sass 1.92.0. |
| 172 |
*/ |
| 173 |
'type-function': Deprecation<'type-function'>; |
| 174 |
|
| 175 |
/** |
| 176 |
* Deprecation for passing a relative url to compileString(). |
| 177 |
* |
| 178 |
* This deprecation became active in Dart Sass 1.88.0. |
| 179 |
*/ |
| 180 |
'compile-string-relative-url': Deprecation<'compile-string-relative-url'>; |
| 181 |
|
| 182 |
/** |
| 183 |
* Deprecation for a rest parameter before a positional or named parameter. |
| 184 |
* |
| 185 |
* This deprecation became active in Dart Sass 1.91.0. |
| 186 |
*/ |
| 187 |
'misplaced-rest': Deprecation<'misplaced-rest'>; |
| 188 |
|
| 189 |
/** |
| 190 |
* Deprecation for configuring private variables in @use, @forward, or load-css(). |
| 191 |
* |
| 192 |
* This deprecation became active in Dart Sass 1.92.0. |
| 193 |
*/ |
| 194 |
'with-private': Deprecation<'with-private'>; |
| 195 |
|
| 196 |
/** |
| 197 |
* Deprecation for the Sass if($condition, $if-true, $if-false) function. |
| 198 |
* |
| 199 |
* This deprecation became active in Dart Sass 1.95.0. |
| 200 |
*/ |
| 201 |
'if-function': Deprecation<'if-function'>; |
| 202 |
|
| 203 |
/** |
| 204 |
* Deprecation for uppercase reserved function names. |
| 205 |
* |
| 206 |
* This deprecation became active in Dart Sass 1.98.0. |
| 207 |
*/ |
| 208 |
'function-name': Deprecation<'function-name'>; |
| 209 |
|
| 210 |
/** |
| 211 |
* Deprecation for adjacent compound selectors like `[class]a`. |
| 212 |
* |
| 213 |
* This deprecation became active in Dart Sass 1.100.0. |
| 214 |
*/ |
| 215 |
'adjacent-compounds': Deprecation<'adjacent-compounds'>; |
| 216 |
|
| 217 |
// END AUTOGENERATED LIST |
| 218 |
|
| 219 |
/** |
| 220 |
* Used for any user-emitted deprecation warnings. |
| 221 |
*/ |
| 222 |
'user-authored': Deprecation<'user-authored', 'user'>; |
| 223 |
} |
| 224 |
|
| 225 |
/** |
| 226 |
* Either a deprecation or its ID, either of which can be passed to any of |
| 227 |
* the relevant compiler options. |
| 228 |
* |
| 229 |
* @category Messages |
| 230 |
* @compatibility dart: "1.74.0", node: false |
| 231 |
*/ |
| 232 |
export type DeprecationOrId = Deprecation | keyof Deprecations; |
| 233 |
|
| 234 |
/** |
| 235 |
* The possible statuses that each deprecation can have. |
| 236 |
* |
| 237 |
* "active" deprecations are currently emitting deprecation warnings. |
| 238 |
* "future" deprecations are not yet active, but will be in the future. |
| 239 |
* "obsolete" deprecations were once active, but no longer are. |
| 240 |
* |
| 241 |
* The only "user" deprecation is "user-authored", which is used for deprecation |
| 242 |
* warnings coming from user code. |
| 243 |
* |
| 244 |
* @category Messages |
| 245 |
* @compatibility dart: "1.74.0", node: false |
| 246 |
*/ |
| 247 |
export type DeprecationStatus = 'active' | 'user' | 'future' | 'obsolete'; |
| 248 |
|
| 249 |
/** |
| 250 |
* A deprecated feature in the language. |
| 251 |
* |
| 252 |
* @category Messages |
| 253 |
* @compatibility dart: "1.74.0", node: false |
| 254 |
*/ |
| 255 |
export interface Deprecation< |
| 256 |
id extends keyof Deprecations = keyof Deprecations, |
| 257 |
status extends DeprecationStatus = DeprecationStatus |
| 258 |
> { |
| 259 |
/** The unique ID of this deprecation. */ |
| 260 |
id: id; |
| 261 |
|
| 262 |
/** The current status of this deprecation. */ |
| 263 |
status: status; |
| 264 |
|
| 265 |
/** A human-readable description of this deprecation. */ |
| 266 |
description?: string; |
| 267 |
|
| 268 |
/** The version this deprecation first became active in. */ |
| 269 |
deprecatedIn: status extends 'future' | 'user' ? null : Version; |
| 270 |
|
| 271 |
/** The version this deprecation became obsolete in. */ |
| 272 |
obsoleteIn: status extends 'obsolete' ? Version : null; |
| 273 |
} |
| 274 |
|
| 275 |
/** |
| 276 |
* A semantic version of the compiler. |
| 277 |
* |
| 278 |
* @category Messages |
| 279 |
* @compatibility dart: "1.74.0", node: false |
| 280 |
*/ |
| 281 |
export class Version { |
| 282 |
/** |
| 283 |
* Constructs a new version. |
| 284 |
* |
| 285 |
* All components must be non-negative integers. |
| 286 |
* |
| 287 |
* @param major - The major version. |
| 288 |
* @param minor - The minor version. |
| 289 |
* @param patch - The patch version. |
| 290 |
*/ |
| 291 |
constructor(major: number, minor: number, patch: number); |
| 292 |
readonly major: number; |
| 293 |
readonly minor: number; |
| 294 |
readonly patch: number; |
| 295 |
|
| 296 |
/** |
| 297 |
* Parses a version from a string. |
| 298 |
* |
| 299 |
* This throws an error if a valid version can't be parsed. |
| 300 |
* |
| 301 |
* @param version - A string in the form "major.minor.patch". |
| 302 |
*/ |
| 303 |
static parse(version: string): Version; |
| 304 |
} |
| 305 |
|
| 306 |
/** |
| 307 |
* An object containing all deprecation types. |
| 308 |
* |
| 309 |
* @category Messages |
| 310 |
* @compatibility dart: "1.74.0", node: false |
| 311 |
*/ |
| 312 |
export const deprecations: Deprecations; |