TypeScript Type Inference Issue with `Effect.forEach` and Strings

Hi here! Is it a known issue that Effect.forEach can be called with a string instead of an array without Typescript telling that there's an issue? This results in a runtime issue that cannot be caught at compile time.
See this playground with this code:
import { Effect, pipe } from "effect"

const program = Effect.forEach("foo", (value) => Effect.succeed(value))

Effect.runSync(
  pipe(program, Effect.flatMap((result) => Effect.log(result)))
)

leading to no Typescript error found but a "RuntimeException: Not a valid effect" error at runtime
image.png
Was this page helpful?