(handler: (error: ErrorEvent) => void)
| 46 | } |
| 47 | |
| 48 | onError(handler: (error: ErrorEvent) => void): void { |
| 49 | this._worker.onError((error) => { |
| 50 | handler(error as unknown as ErrorEvent); |
| 51 | }); |
| 52 | } |
| 53 | |
| 54 | terminate(): void { |
| 55 | this._worker.terminate(); |