index.d.ts 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637
  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. import { Compiler } from 'webpack';
  10. export = WebpackNotifierPlugin;
  11. declare class WebpackNotifierPlugin {
  12. constructor(options?: WebpackNotifierPlugin.Options);
  13. apply(compiler: Compiler): void;
  14. }
  15. declare namespace WebpackNotifierPlugin {
  16. interface Options {
  17. alwaysNotify?: boolean;
  18. contentImage?: {[key in 'success' | 'warning' | 'error']: string} | string;
  19. excludeWarnings?: boolean;
  20. onlyOnError?: boolean;
  21. skipFirstNotification?: boolean;
  22. title?: string | TitleGetter;
  23. /**
  24. * Use emoji in notifications
  25. */
  26. emoji?: boolean;
  27. }
  28. /** @deprecated use Options */
  29. type Config = Options;
  30. type TitleGetter = (data: {msg: string,message: string,status: string}) => string;
  31. }