* Retrieves the state of the fiber ref, or else its initial value. * * **NOTE**: This method is safe to invoke on any fiber, but if not invoked * on this fiber, then values derived from the fiber's state (including the * log annotations and log level) may not be up-to-date.
(fiberRef: FiberRef.FiberRef<X>)
| 578 | * log annotations and log level) may not be up-to-date. |
| 579 | */ |
| 580 | getFiberRef<X>(fiberRef: FiberRef.FiberRef<X>): X { |
| 581 | if (this._fiberRefs.locals.has(fiberRef)) { |
| 582 | return this._fiberRefs.locals.get(fiberRef)![0][1] as X |
| 583 | } |
| 584 | return fiberRef.initial |
| 585 | } |
| 586 | |
| 587 | /** |
| 588 | * Sets the fiber ref to the specified value. |
no test coverage detected