UNPKG

1.39 kBTypeScriptView Raw
1// Type definitions for progress-bar-webpack-plugin 2.1
2// Project: https://github.com/clessg/progress-bar-webpack-plugin#readme
3// Definitions by: Piotr Błażejewicz (Peter Blazejewicz) <https://github.com/peterblazejewicz>
4// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
5// TypeScript Version: 3.7
6
7import * as ProgressBar from 'progress';
8import { Plugin } from 'webpack';
9
10export = ProgressBarPlugin;
11
12declare namespace ProgressBarPlugin {
13 interface Options extends ProgressBar.ProgressBarOptions {
14 /**
15 * the format of the progress bar
16 * @default ':bar'
17 */
18 format?: string | undefined;
19 /**
20 * optional function to call when the progress bar completes
21 */
22 callback?: (() => void) | undefined;
23 /**
24 * option to show summary of time taken
25 * @default true
26 */
27 summary?: boolean | undefined;
28 /**
29 * custom summary message if summary option is false
30 */
31 summaryContent?: boolean | undefined;
32 /**
33 * function to display a custom summary
34 * (passed build time)
35 */
36 customSummary?: ((summary: string) => void) | undefined;
37 }
38}
39
40/**
41 * A progress bar plugin for Webpack.
42 */
43declare class ProgressBarPlugin extends Plugin {
44 constructor(options?: ProgressBarPlugin.Options);
45}
46
\No newline at end of file