source: imaps-frontend/node_modules/core-js-compat/compat.d.ts

main
Last change on this file was 79a0317, checked in by stefan toskovski <stefantoska84@…>, 4 days ago

F4 Finalna Verzija

  • Property mode set to 100644
File size: 1.3 KB
RevLine 
[79a0317]1import type { ModuleName, Target, TargetVersion } from "./shared";
2
3type StringOrRegExp = string | RegExp;
4
5type Modules = StringOrRegExp | readonly StringOrRegExp[];
6
7type BrowserslistQuery = string | ReadonlyArray<string>;
8
9type Environments = {
10 [target in Target]?: string | number;
11};
12
13type Targets = Environments & {
14 browsers?: Environments | BrowserslistQuery,
15 esmodules?: boolean,
16};
17
18type 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
35type 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
46declare function compat(options?: CompatOptions): CompatOutput;
47
48export = compat;
Note: See TracBrowser for help on using the repository browser.