Effect CommunityEC
Effect Community3y ago
10 replies
bug

Changes in `Effect.all({})` causing type errors

did something about Effect.all({}) change, or did i break something? when starting a new project, using "typescript": "^5.2.2" and "effect": "2.0.0-next.55", the following errors occur:

import { Effect } from "effect";

// const main: Effect.Effect<unknown, unknown, unknown[]>
const main = Effect.all({ foo: Effect.succeed(true) });

/*
Argument of type 'Effect<unknown, unknown, unknown[]>' is not assignable to parameter of type 'Effect<never, unknown, unknown[]>'.
  Type 'unknown' is not assignable to type 'never'.ts(2345)
*/
Effect.runPromise(main).then(console.log);
// > { foo: true }


runs fine, but compiler is getting confused? array form Effect.all([]) works as expected.
Was this page helpful?