UNPKG

1.28 kBTypeScriptView Raw
1// Type definitions imported from DefinitielyTyped for webpack-notifier 1.13
2// Project: https://github.com/Turbo87/webpack-notifier#readme
3// Definitions by: Benjamin Lim <https://github.com/bumbleblym>
4// Piotr Błażejewicz <https://github.com/peterblazejewicz>
5// Alexandre Germain <https://github.com/gerkindev>
6// Gvozdev Viktor <https://github.com/Gvozd>
7// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
8// TypeScript Version: 3.9
9
10import { Compiler } from 'webpack';
11
12export = WebpackNotifierPlugin;
13
14declare class WebpackNotifierPlugin {
15 constructor(options?: WebpackNotifierPlugin.Options);
16 apply(compiler: Compiler): void;
17}
18
19declare namespace WebpackNotifierPlugin {
20 interface Options {
21 alwaysNotify?: boolean;
22 contentImage?: {[key in 'success' | 'warning' | 'error']: string} | string;
23 excludeWarnings?: boolean;
24 onlyOnError?: boolean;
25 skipFirstNotification?: boolean;
26 title?: string | TitleGetter;
27 /**
28 * Use emoji in notifications
29 */
30 emoji?: boolean;
31 }
32
33 /** @deprecated use Options */
34 type Config = Options;
35
36 type TitleGetter = (data: {msg: string,message: string,status: string}) => string;
37}