main
Last change
on this file since 79a0317 was 79a0317, checked in by stefan toskovski <stefantoska84@…>, 3 days ago |
F4 Finalna Verzija
|
-
Property mode
set to
100644
|
File size:
1.3 KB
|
Line | |
---|
1 | import type { ModuleName, Target, TargetVersion } from "./shared";
|
---|
2 |
|
---|
3 | type StringOrRegExp = string | RegExp;
|
---|
4 |
|
---|
5 | type Modules = StringOrRegExp | readonly StringOrRegExp[];
|
---|
6 |
|
---|
7 | type BrowserslistQuery = string | ReadonlyArray<string>;
|
---|
8 |
|
---|
9 | type Environments = {
|
---|
10 | [target in Target]?: string | number;
|
---|
11 | };
|
---|
12 |
|
---|
13 | type Targets = Environments & {
|
---|
14 | browsers?: Environments | BrowserslistQuery,
|
---|
15 | esmodules?: boolean,
|
---|
16 | };
|
---|
17 |
|
---|
18 | type CompatOptions = {
|
---|
19 | /** entry / module / namespace / an array of them, by default - all `core-js` modules */
|
---|
20 | modules?: Modules,
|
---|
21 | /** a blacklist, entry / module / namespace / an array of them, by default - empty list */
|
---|
22 | exclude?: Modules,
|
---|
23 | /** optional browserslist or core-js-compat format query */
|
---|
24 | targets?: Targets | BrowserslistQuery,
|
---|
25 | /** used `core-js` version, by default the latest */
|
---|
26 | version?: string,
|
---|
27 | /** inverse of the result, shows modules that are NOT required for the target environment */
|
---|
28 | inverse?: boolean,
|
---|
29 | /**
|
---|
30 | * @deprecated use `modules` instead
|
---|
31 | */
|
---|
32 | filter?: Modules
|
---|
33 | };
|
---|
34 |
|
---|
35 | type CompatOutput = {
|
---|
36 | /** array of required modules */
|
---|
37 | list: ModuleName[],
|
---|
38 | /** object with targets for each module */
|
---|
39 | targets: {
|
---|
40 | [module: ModuleName]: {
|
---|
41 | [target in Target]?: TargetVersion
|
---|
42 | }
|
---|
43 | }
|
---|
44 | }
|
---|
45 |
|
---|
46 | declare function compat(options?: CompatOptions): CompatOutput;
|
---|
47 |
|
---|
48 | export = compat;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.