(action: string, payload: Object)
| 213 | } |
| 214 | |
| 215 | postMessage(action: string, payload: Object): Promise<void> { |
| 216 | return new Promise<void>((resolve) => { |
| 217 | this.worker.pipe(take(1)).subscribe((sw) => { |
| 218 | sw.postMessage({ |
| 219 | action, |
| 220 | ...payload, |
| 221 | }); |
| 222 | |
| 223 | resolve(); |
| 224 | }); |
| 225 | }); |
| 226 | } |
| 227 | |
| 228 | postMessageWithOperation( |
| 229 | type: string, |
no test coverage detected