Method
delWait
(key: IPublicTypeEditorValueKey, fn: any)
Source from the content-addressed store, hash-verified
| 339 | } |
| 340 | |
| 341 | private delWait(key: IPublicTypeEditorValueKey, fn: any) { |
| 342 | const waits = this.waits.get(key); |
| 343 | if (!waits) { |
| 344 | return; |
| 345 | } |
| 346 | let i = waits.length; |
| 347 | while (i--) { |
| 348 | if (waits[i].resolve === fn) { |
| 349 | waits.splice(i, 1); |
| 350 | } |
| 351 | } |
| 352 | if (waits.length < 1) { |
| 353 | this.waits.delete(key); |
| 354 | } |
| 355 | } |
| 356 | } |
| 357 | |
| 358 | export const commonEvent = new EventBus(new EventEmitter()); |
Tested by
no test coverage detected