Type Inference Issue with `Effect.fn` in TypeScript

Hello. I have a problem with
Effect.fn
not inferring the type of the arguments correctly in the following case:
import { Effect } from "effect"

function call<A, E, R, T = void>(fn: (a: string, b: T) => Effect.Effect<A, E, R>) {
  return (b: T) => fn("value", b)
}

const fnA = call((a, b: number) => // a is `string`
  Effect.gen(function* () {
    return yield* Effect.succeed(`${a}: ${b}`)
  }),
)

const fnB = call(
  Effect.fn(function* (a, b: number) { // a is `any`?
    return yield* Effect.succeed(`${a}: ${b}`)
  }),
)

Has anyone else stumbled on this before? I can't figure out how to make it work correctly.
Here is also the example in playground: https://effect.website/play#6e19782f37c1
If you hover over a in the fnB you will see that the type is any.
Was this page helpful?