* Adds an observer to the list of observers. * * **NOTE**: This method must be invoked by the fiber itself.
(observer: (exit: Exit.Exit<A, E>) => void)
| 533 | * **NOTE**: This method must be invoked by the fiber itself. |
| 534 | */ |
| 535 | addObserver(observer: (exit: Exit.Exit<A, E>) => void): void { |
| 536 | if (this._exitValue !== null) { |
| 537 | observer(this._exitValue!) |
| 538 | } else { |
| 539 | this._observers.push(observer) |
| 540 | } |
| 541 | } |
| 542 | |
| 543 | /** |
| 544 | * Removes the specified observer from the list of observers that will be |
no test coverage detected