1 | import { Plugin } from 'postcss'
|
2 | import { Stats } from 'browserslist'
|
3 |
|
4 | declare function autoprefixer<T extends string[]>(
|
5 | ...args: [...T, autoprefixer.Options]
|
6 | ): Plugin & autoprefixer.ExportedAPI
|
7 |
|
8 | declare function autoprefixer(
|
9 | browsers: string[],
|
10 | options?: autoprefixer.Options
|
11 | ): Plugin & autoprefixer.ExportedAPI
|
12 |
|
13 | declare function autoprefixer(
|
14 | options?: autoprefixer.Options
|
15 | ): Plugin & autoprefixer.ExportedAPI
|
16 |
|
17 | declare namespace autoprefixer {
|
18 | type GridValue = 'autoplace' | 'no-autoplace'
|
19 |
|
20 | interface Options {
|
21 | /** environment for `Browserslist` */
|
22 | env?: string
|
23 |
|
24 | /** should Autoprefixer use Visual Cascade, if CSS is uncompressed */
|
25 | cascade?: boolean
|
26 |
|
27 | /** should Autoprefixer add prefixes. */
|
28 | add?: boolean
|
29 |
|
30 | /** should Autoprefixer [remove outdated] prefixes */
|
31 | remove?: boolean
|
32 |
|
33 | /** should Autoprefixer add prefixes for @supports parameters. */
|
34 | supports?: boolean
|
35 |
|
36 | /** should Autoprefixer add prefixes for flexbox properties */
|
37 | flexbox?: boolean | 'no-2009'
|
38 |
|
39 | /** should Autoprefixer add IE 10-11 prefixes for Grid Layout properties */
|
40 | grid?: boolean | GridValue
|
41 |
|
42 | /** custom usage statistics for > 10% in my stats browsers query */
|
43 | stats?: Stats
|
44 |
|
45 | |
46 |
|
47 |
|
48 |
|
49 |
|
50 |
|
51 | overrideBrowserslist?: string | string[]
|
52 |
|
53 |
|
54 | ignoreUnknownVersions?: boolean
|
55 | }
|
56 |
|
57 | interface ExportedAPI {
|
58 |
|
59 | data: {
|
60 | browsers: { [browser: string]: object | undefined }
|
61 | prefixes: { [prefixName: string]: object | undefined }
|
62 | }
|
63 |
|
64 |
|
65 | defaults: string[]
|
66 |
|
67 |
|
68 | info(options?: { from?: string }): string
|
69 |
|
70 | options: Options
|
71 |
|
72 | browsers: string | string[]
|
73 | }
|
74 |
|
75 |
|
76 | let data: ExportedAPI['data']
|
77 |
|
78 |
|
79 | let defaults: ExportedAPI['defaults']
|
80 |
|
81 |
|
82 | let info: ExportedAPI['info']
|
83 |
|
84 | let postcss: true
|
85 | }
|
86 |
|
87 | declare global {
|
88 | namespace NodeJS {
|
89 | interface ProcessEnv {
|
90 | AUTOPREFIXER_GRID?: autoprefixer.GridValue
|
91 | }
|
92 | }
|
93 | }
|
94 |
|
95 | export = autoprefixer
|