forked from zloirock/core-js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.d.ts
31 lines (24 loc) · 1 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import type compat from "core-js-compat";
type Format = 'bundle' | 'esm' | 'cjs';
type SummaryEntry = boolean | {
size?: boolean,
modules?: boolean,
};
type Summary = {
/** in the console, you could specify required parts or set `true` for enable all of them */
comment?: SummaryEntry,
/** in the comment, you could specify required parts or set `true` for enable all of them */
console?: SummaryEntry,
};
type CompatOptions = Exclude<Parameters<typeof compat.compat>[0], undefined>;
type Options = Pick<CompatOptions, "exclude" | "modules" | "targets"> & {
/** output format, 'bundle' by default, can be 'cjs' or 'esm', and in this case
* the result will not be bundled and will contain imports of required modules */
format?: Format,
/** optional target filename, if it's missed a file will not be created */
filename?: string,
/** shows summary for the bundle, disabled by default */
summary?: Summary,
};
declare function builder(options?: Options): Promise<string>;
export = builder;