UNPKG

@types/webpack-error-notification

Version:
45 lines (34 loc) 1.75 kB
# Installation > `npm install --save @types/webpack-error-notification` # Summary This package contains type definitions for webpack-error-notification (https://github.com/vsolovyov/webpack-error-notification#readme). # Details Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/webpack-error-notification. ## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/webpack-error-notification/index.d.ts) ````ts import { Plugin, Stats } from "webpack"; declare class WebpackErrorNotificationPlugin extends Plugin { /** * You can supply some strategy for the plugin to display notification. * If you don't supply anything, it will use process.platform as a strategy name. * `darwin` and `linux` are supported out of the box now. * You can also supply function(msg) {} as a strategy that will use your notification CLI tool of choice. */ constructor(strategy?: WebpackErrorNotificationPlugin.Strategy, options?: WebpackErrorNotificationPlugin.Options); compileMessage(stats: Stats): string; compilationDone(stats: Stats): void; } declare namespace WebpackErrorNotificationPlugin { type Strategy = "darwin" | "linux" | ((msg: string) => void); interface Options { /** if you do not want to notify warnings, set this to `false` */ notifyWarnings?: boolean | undefined; } } export = WebpackErrorNotificationPlugin; ```` ### Additional Details * Last updated: Tue, 07 Nov 2023 15:11:36 GMT * Dependencies: [@types/webpack](https://npmjs.com/package/@types/webpack) # Credits These definitions were written by [Piotr Błażejewicz (Peter Blazejewicz)](https://github.com/peterblazejewicz).