/// import { EventEmitter } from 'events'; import * as webpack from 'webpack'; import Runner from '../../../runner'; import { CompilationMessages } from '../utilities'; export interface Options { debug: boolean; } export default class ServiceWorker extends EventEmitter { private config; private runner; constructor(config: webpack.Configuration, runner: Runner); run(): Promise; on(event: 'compile', handler: () => void): this; on(event: 'compile-error', handler: (stats: webpack.Stats, lastClientStats: CompilationMessages) => void): this; on(event: 'compile-failed', handler: (error: Error) => void): this; on(event: 'done', handler: (stats: webpack.Stats) => void): this; emit(event: 'compile-error', stats: webpack.Stats, lastClientStats: CompilationMessages): boolean; emit(event: 'compile-failed', error: Error): boolean; emit(event: 'compile'): boolean; emit(event: 'done', payload: webpack.Stats): boolean; private log; private debug; }