-
Notifications
You must be signed in to change notification settings - Fork 0
/
summary.types.ts
39 lines (35 loc) · 897 Bytes
/
summary.types.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
32
33
34
35
36
37
38
39
import { OutputBundle } from 'rollup';
import { OutputInfo } from './output.types.js';
import { Size } from './size.types.js';
/** Summary sizes. */
export interface SummarySizes {
/** Asset total size. */
asset?: Size;
/** Chunk total size. */
chunk?: Size;
/** Entry total size. */
entry?: Size;
/** Total size of all output types. */
total: Size;
}
/** Summary info. */
export interface Summary extends SummarySizes {
/** Gzipped sizes. */
gzip?: SummarySizes;
}
/** Summary output. */
export interface SummaryOutput {
/** Output info. */
info: OutputInfo;
/** The Rollup output chunk or asset. */
output: OutputBundle[keyof OutputBundle];
}
/**
* Override summary output.
* @param summary The summary info.
* @param outputs List of summary output.
*/
export type SummaryCallback = (
summary: Summary,
outputs: SummaryOutput[]
) => void | Promise<void>;