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

Method getCont

packages/effect/src/Micro.ts:571–581  ·  view source on GitHub ↗
(
    symbol: S
  )

Source from the content-addressed store, hash-verified

569 }
570
571 getCont<S extends successCont | failureCont>(
572 symbol: S
573 ): Primitive & Record<S, (value: any, fiber: MicroFiberImpl) => Primitive> | undefined {
574 while (true) {
575 const op = this._stack.pop()
576 if (!op) return undefined
577 const cont = op[ensureCont] && op[ensureCont](this)
578 if (cont) return { [symbol]: cont } as any
579 if (op[symbol]) return op as any
580 }
581 }
582
583 // cancel the yielded operation, or for the yielded exit value
584 _yielded: MicroExit<any, any> | (() => void) | undefined = undefined

Callers 1

evalFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected