(cb: (exit: Exit.Exit<A, E>) => void)
| 596 | return Context.getReferenceUnsafe(this.context, ref) |
| 597 | } |
| 598 | addObserver(cb: (exit: Exit.Exit<A, E>) => void): () => void { |
| 599 | if (this._exit) { |
| 600 | cb(this._exit) |
| 601 | return constVoid |
| 602 | } |
| 603 | ;(this._observers ??= []).push(cb) |
| 604 | return () => this.removeObserver(cb) |
| 605 | } |
| 606 | removeObserver(cb: (exit: Exit.Exit<A, E>) => void): void { |
| 607 | if (this._exit || this._observers === undefined) return |
| 608 | const index = this._observers.indexOf(cb) |
no test coverage detected