1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 | declare function browserslist (
|
12 | queries?: string | readonly string[] | null,
|
13 | opts?: browserslist.Options
|
14 | ): string[]
|
15 |
|
16 | declare namespace browserslist {
|
17 | interface Options {
|
18 | |
19 |
|
20 |
|
21 | path?: string | false
|
22 | |
23 |
|
24 |
|
25 |
|
26 | env?: string
|
27 | |
28 |
|
29 |
|
30 | stats?: Stats | string
|
31 | |
32 |
|
33 |
|
34 | config?: string
|
35 | |
36 |
|
37 |
|
38 | ignoreUnknownVersions?: boolean
|
39 | |
40 |
|
41 |
|
42 | dangerousExtend?: boolean
|
43 | |
44 |
|
45 |
|
46 |
|
47 | mobileToDesktop?: boolean
|
48 | }
|
49 |
|
50 | type Config = {
|
51 | defaults: string[]
|
52 | [section: string]: string[] | undefined
|
53 | }
|
54 |
|
55 | interface Stats {
|
56 | [browser: string]: {
|
57 | [version: string]: number
|
58 | }
|
59 | }
|
60 |
|
61 | |
62 |
|
63 |
|
64 | let aliases: {
|
65 | [alias: string]: string | undefined
|
66 | }
|
67 |
|
68 | |
69 |
|
70 |
|
71 | let versionAliases: {
|
72 | [browser: string]:
|
73 | | {
|
74 | [version: string]: string | undefined
|
75 | }
|
76 | | undefined
|
77 | }
|
78 |
|
79 | |
80 |
|
81 |
|
82 |
|
83 |
|
84 | let desktopNames: {
|
85 | [browser: string]: string | undefined
|
86 | }
|
87 |
|
88 | let data: {
|
89 | [browser: string]:
|
90 | | {
|
91 | name: string
|
92 | versions: string[]
|
93 | released: string[]
|
94 | releaseDate: {
|
95 | [version: string]: number | undefined | null
|
96 | }
|
97 | }
|
98 | | undefined
|
99 | }
|
100 |
|
101 | interface Usage {
|
102 | [version: string]: number
|
103 | }
|
104 |
|
105 | let usage: {
|
106 | global?: Usage
|
107 | custom?: Usage | null
|
108 | [country: string]: Usage | undefined | null
|
109 | }
|
110 |
|
111 | let cache: {
|
112 | [feature: string]: {
|
113 | [name: string]: 'y' | 'n'
|
114 | }
|
115 | }
|
116 |
|
117 | |
118 |
|
119 |
|
120 | let defaults: readonly string[]
|
121 |
|
122 | |
123 |
|
124 |
|
125 |
|
126 | type StatsOptions = string | 'my stats' | Stats | { dataByBrowser: Stats }
|
127 |
|
128 | |
129 |
|
130 |
|
131 |
|
132 |
|
133 |
|
134 |
|
135 |
|
136 |
|
137 |
|
138 |
|
139 | function coverage (browsers: readonly string[], stats?: StatsOptions): number
|
140 |
|
141 | function clearCaches (): void
|
142 |
|
143 | function parseConfig (string: string): Config
|
144 |
|
145 | function readConfig (file: string): Config
|
146 |
|
147 | function findConfig (...pathSegments: string[]): Config | undefined
|
148 |
|
149 | interface LoadConfigOptions {
|
150 | config?: string
|
151 | path?: string
|
152 | env?: string
|
153 | }
|
154 |
|
155 | function loadConfig (options: LoadConfigOptions): string[] | undefined
|
156 | }
|
157 |
|
158 | declare global {
|
159 | namespace NodeJS {
|
160 | interface ProcessEnv {
|
161 | BROWSERSLIST?: string
|
162 | BROWSERSLIST_CONFIG?: string
|
163 | BROWSERSLIST_DANGEROUS_EXTEND?: string
|
164 | BROWSERSLIST_DISABLE_CACHE?: string
|
165 | BROWSERSLIST_ENV?: string
|
166 | BROWSERSLIST_IGNORE_OLD_DATA?: string
|
167 | BROWSERSLIST_STATS?: string
|
168 | }
|
169 | }
|
170 | }
|
171 |
|
172 | export = browserslist
|
173 |
|
\ | No newline at end of file |