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

Function withSTMRuntime

packages/effect/src/internal/stm/core.ts:713–719  ·  view source on GitHub ↗
(
  f: (runtime: STMDriver<unknown, unknown, unknown>) => STM.STM<A, E, R>
)

Source from the content-addressed store, hash-verified

711
712/** @internal */
713export const withSTMRuntime = <A, E = never, R = never>(
714 f: (runtime: STMDriver<unknown, unknown, unknown>) => STM.STM<A, E, R>
715): STM.STM<A, E, R> => {
716 const stm = new STMPrimitive(OpCodes.OP_WITH_STM_RUNTIME)
717 stm.effect_instruction_i1 = f
718 return stm
719}
720
721/** @internal */
722export const interrupt: STM.STM<never> = withSTMRuntime((_) => {

Callers 2

effectFunction · 0.85
core.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…