Effect CommunityEC
Effect Community4y ago
13 replies
ts

runtime env

Curious why this compiles:
import {Effect} from 'effect';

type T = {foo: string};

declare const withT: Effect.Effect<T, never, void>;

const program = Effect.gen(function* ($) {
    const runtime = yield* $(Effect.runtime());
    runtime.unsafeRunPromise(withT);
});
Was this page helpful?