Metakit / @doeixd/metakit/temporal

EffectScenario

interface · packages/metakit/src/temporalWalk.ts:176

interface EffectScenario<World, Name extends string, E = unknown, R = never> {
  readonly initial: Effect.Effect<World, E, Scope.Scope | R>
  readonly steps: ReadonlyArray<EffectStep<World, Name, E, R>>
  readonly holds: (
    world: World,
    ran: ReadonlyArray<Name>,
  ) => Effect.Effect<Option.Option<string>, E, R>
}

Scenario for Effect-native steps: each order runs inside its own Scope for automatic teardown.

Members

EffectScenario.initial

property · packages/metakit/src/temporalWalk.ts:177

readonly initial: Effect.Effect<World, E, Scope.Scope | R>

EffectScenario.steps

property · packages/metakit/src/temporalWalk.ts:178

readonly steps: ReadonlyArray<EffectStep<World, Name, E, R>>

EffectScenario.holds

property · packages/metakit/src/temporalWalk.ts:180

readonly holds: (
  world: World,
  ran: ReadonlyArray<Name>,
) => Effect.Effect<Option.Option<string>, E, R>

Asked after every step, with the steps run so far: a reason when the property is broken.