1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 | import { StatsCompilation } from 'webpack';
|
9 | import { Budget } from '../browser/schema';
|
10 | import { ProcessBundleResult } from '../utils/process-bundle';
|
11 | interface Threshold {
|
12 | limit: number;
|
13 | type: ThresholdType;
|
14 | severity: ThresholdSeverity;
|
15 | }
|
16 | declare enum ThresholdType {
|
17 | Max = "maximum",
|
18 | Min = "minimum"
|
19 | }
|
20 | export declare enum ThresholdSeverity {
|
21 | Warning = "warning",
|
22 | Error = "error"
|
23 | }
|
24 | export declare function calculateThresholds(budget: Budget): IterableIterator<Threshold>;
|
25 | export declare function checkBudgets(budgets: Budget[], webpackStats: StatsCompilation, processResults: ProcessBundleResult[]): IterableIterator<{
|
26 | severity: ThresholdSeverity;
|
27 | message: string;
|
28 | }>;
|
29 | export declare function checkThresholds(thresholds: IterableIterator<Threshold>, size: number, label?: string): IterableIterator<{
|
30 | severity: ThresholdSeverity;
|
31 | message: string;
|
32 | }>;
|
33 | export {};
|