fix(autoprefixer): correct deprecated properties (#42981)

- added deprecated options that are still in the api, but not documented
as public option anymore
- documentation for `overrideBrowserslist` updated

https://github.com/postcss/autoprefixer/blob/master/lib/autoprefixer.js#L68-L93

Thanks!
This commit is contained in:
Piotr Błażejewicz (Peter Blazejewicz)
2020-03-10 15:36:46 -07:00
committed by GitHub
parent 92cbfa7e39
commit d2e8296464
2 changed files with 20 additions and 2 deletions
+6
View File
@@ -18,6 +18,12 @@ const ap2: Transformer = autoprefixer({
ignoreUnknownVersions: false,
});
const deprecationTest = autoprefixer({
browser: 'defaults',
browsers: 'defaults',
browserslist: 'defaults',
});
autoprefixer.info(); // $ExpectedType () => void
autoprefixer.data; // $ExpectType { browsers: any; prefixes: any; }
autoprefixer.defaults; // $ExpectedType string
+14 -2
View File
@@ -30,9 +30,21 @@ declare namespace autoprefixer {
grid?: false | 'autoplace' | 'no-autoplace';
/** custom usage statistics for > 10% in my stats browsers query */
stats?: Stats;
/** @deprecated Replace Autoprefixer `browsers` option to `Browserslist` config */
/** @deprecated 'Change `browser` option to `overrideBrowserslist` in Autoprefixer */
browser?: string;
/**
* @deprecated Replace Autoprefixer `browsers` option to Browserslist config.
* Use `browserslist` key in `package.json` or `.browserslistrc` file.
*/
browsers?: string[] | string;
/** list of queries for target browsers */
/** @deprecated Change `browserslist` option to `overrideBrowserslist` in Autoprefixer */
browserslist?: string[] | string;
/**
* list of queries for target browsers.
* Try to not use it.
* The best practice is to use `.browserslistrc` config or `browserslist` key in `package.json`
* to share target browsers with Babel, ESLint and Stylelint
*/
overrideBrowserslist?: BrowserslistTarget;
/** do not raise error on unknown browser version in `Browserslist` config. */
ignoreUnknownVersions?: boolean;