UNPKG

1.11 kBTypeScriptView Raw
1/**
2 * @license
3 * Copyright Google LLC All Rights Reserved.
4 *
5 * Use of this source code is governed by an MIT-style license that can be
6 * found in the LICENSE file at https://angular.io/license
7 */
8import { StatsCompilation } from 'webpack';
9import { Budget } from '../browser/schema';
10import { ProcessBundleResult } from '../utils/process-bundle';
11interface Threshold {
12 limit: number;
13 type: ThresholdType;
14 severity: ThresholdSeverity;
15}
16declare enum ThresholdType {
17 Max = "maximum",
18 Min = "minimum"
19}
20export declare enum ThresholdSeverity {
21 Warning = "warning",
22 Error = "error"
23}
24export declare function calculateThresholds(budget: Budget): IterableIterator<Threshold>;
25export declare function checkBudgets(budgets: Budget[], webpackStats: StatsCompilation, processResults: ProcessBundleResult[]): IterableIterator<{
26 severity: ThresholdSeverity;
27 message: string;
28}>;
29export declare function checkThresholds(thresholds: IterableIterator<Threshold>, size: number, label?: string): IterableIterator<{
30 severity: ThresholdSeverity;
31 message: string;
32}>;
33export {};