Effect CommunityEC
Effect Community3y ago
4 replies
iamK

Typescript not throwing error when adding multiple contexts

Hi,
Shouldn't typescript complain about this, In my cases it doesn't, has anything changed recently

    const context = pipe(Context.empty(),Context.add(A),Context.add(B)) 
    const effect = ... // <A|B|C,never,boolean>
    const program = pipe(
      effect,
      Effect.provideContext(context)
    );
await Effect.runPromise(program);
Was this page helpful?