MCPcopy Create free account
hub / github.com/Effect-TS/effect / getCont

Method getCont

packages/effect/src/internal/effect.ts:679–697  ·  view source on GitHub ↗
(symbol: S)

Source from the content-addressed store, hash-verified

677 }
678 }
679 getCont<S extends contA | contE>(symbol: S):
680 | (Primitive & Record<S, (value: any, fiber: FiberImpl) => Primitive>)
681 | undefined
682 {
683 if (this._deferredInterrupt) {
684 this._deferredInterrupt = false
685 return deferredInterruptCont
686 }
687 while (true) {
688 const op = this._stack.pop()
689 if (!op) return undefined
690 const cont = op[contAll] && op[contAll](this)
691 if (cont) {
692 ;(cont as any)[symbol] = cont
693 return cont as any
694 }
695 if (op[symbol]) return op as any
696 }
697 }
698 yieldWith(value: Exit.Exit<any, any> | (() => void)): Yield {
699 this._yielded = value
700 return Yield

Callers 2

[evaluate]Function · 0.80
[evaluate]Function · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected