1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 | export interface Options {
|
7 | targets?: TargetsOptions | undefined;
|
8 | bugfixes?: boolean | undefined;
|
9 | spec?: boolean | undefined;
|
10 | loose?: boolean | undefined;
|
11 | modules?: ModuleOption | undefined;
|
12 | debug?: boolean | undefined;
|
13 | include?: PluginList | undefined;
|
14 | exclude?: PluginList | undefined;
|
15 | useBuiltIns?: UseBuiltInsOption | undefined;
|
16 | corejs?: CorejsOption | undefined;
|
17 | forceAllTransforms?: boolean | undefined;
|
18 | configPath?: string | undefined;
|
19 | ignoreBrowserslistConfig?: boolean | undefined;
|
20 | shippedProposals?: boolean | undefined;
|
21 | }
|
22 |
|
23 |
|
24 |
|
25 |
|
26 |
|
27 | export type TargetsOptions = (
|
28 | | BrowserslistQuery
|
29 | | ReadonlyArray<BrowserslistQuery>
|
30 | | { [key in Target]?: string; }
|
31 | | { esmodules: true }
|
32 | | { node: (string | 'current' | true) }
|
33 | | { safari: (string | 'tp') }
|
34 | | { browsers: (string | ReadonlyArray<string>) }
|
35 | );
|
36 |
|
37 | export type BrowserslistQuery = string;
|
38 |
|
39 |
|
40 |
|
41 |
|
42 |
|
43 | export type Target = (
|
44 | | 'Android'
|
45 | | 'Baidu'
|
46 | | 'BlackBerry' | 'bb'
|
47 | | 'Chrome'
|
48 | | 'ChromeAndroid' | 'and_chr'
|
49 | | 'Edge'
|
50 | | 'Electron'
|
51 | | 'Explorer' | 'ie'
|
52 | | 'ExplorerMobile' | 'ie_mob'
|
53 | | 'Firefox' | 'ff'
|
54 | | 'FirefoxAndroid' | 'and_ff'
|
55 | | 'iOS' | 'ios_saf'
|
56 | | 'Node'
|
57 | | 'Opera'
|
58 | | 'OperaMini' | 'op_mini'
|
59 | | 'OperaMobile' | 'op_mob'
|
60 | | 'QQAndroid' | 'and_qq'
|
61 | | 'Safari'
|
62 | | 'Samsung'
|
63 | | 'UCAndroid' | 'and_uc'
|
64 | | 'kaios'
|
65 | );
|
66 |
|
67 |
|
68 |
|
69 |
|
70 | export type ModuleOption = (
|
71 | | 'amd'
|
72 | | 'umd'
|
73 | | 'systemjs'
|
74 | | 'commonjs'
|
75 | | 'cjs'
|
76 | | 'auto'
|
77 | | false
|
78 | );
|
79 |
|
80 | export type PluginList = ReadonlyArray<PluginListItem>;
|
81 | export type PluginListItem = (string | RegExp);
|
82 |
|
83 | export type UseBuiltInsOption = (
|
84 | | 'usage'
|
85 | | 'entry'
|
86 | | false
|
87 | );
|
88 |
|
89 | export type CorejsOption = (
|
90 | | CorejsVersion
|
91 | | { version: CorejsVersion, proposals: boolean }
|
92 | );
|
93 |
|
94 | export type CorejsVersion = (2 | 3);
|