UNPKG

@typed/effects

Version:

Generator-powered Effect management

18 lines 482 B
import { Pure, withEnv as runWithEnv } from '@typed/env'; export var Effect; (function (Effect) { function of(value) { return fromEnv(Pure.of(value)); } Effect.of = of; function* fromEnv(env) { return yield env; } Effect.fromEnv = fromEnv; function* withEnv(fn) { const effect = yield runWithEnv(fn); return yield* effect; } Effect.withEnv = withEnv; })(Effect || (Effect = {})); //# sourceMappingURL=Effect.js.map