(cb: (exit: MicroExit<A, E>) => void)
| 483 | } |
| 484 | |
| 485 | addObserver(cb: (exit: MicroExit<A, E>) => void): () => void { |
| 486 | if (this._exit) { |
| 487 | cb(this._exit) |
| 488 | return constVoid |
| 489 | } |
| 490 | this._observers.push(cb) |
| 491 | return () => { |
| 492 | const index = this._observers.indexOf(cb) |
| 493 | if (index >= 0) { |
| 494 | this._observers.splice(index, 1) |
| 495 | } |
| 496 | } |
| 497 | } |
| 498 | |
| 499 | _interrupted = false |
| 500 | unsafeInterrupt(): void { |
no outgoing calls
no test coverage detected