What version of Effect is running?
3.21.2
What steps can reproduce the bug?
In the following code, data in the recurWhile callback is being inferred as unknown instead of string.
Note that it does work as expected at runtime.
https://effect.website/play/#d94447d949fd
import { Effect, Schedule } from "effect"
const program = Effect.sync(() => {
console.log("Running...")
return "foo"
}).pipe(
Effect.repeat(
Schedule.recurWhile((data) => data === "foo").pipe(
Schedule.addDelay(() => "1 second")
)
)
)
Effect.runPromise(program)
What is the expected behavior?
I would expect data in the recurWhile callback to be inferred as string
What do you see instead?
It is inferred as unknown
Additional information
No response
What version of Effect is running?
3.21.2
What steps can reproduce the bug?
In the following code,
datain therecurWhilecallback is being inferred asunknowninstead ofstring.Note that it does work as expected at runtime.
https://effect.website/play/#d94447d949fd
What is the expected behavior?
I would expect
datain therecurWhilecallback to be inferred asstringWhat do you see instead?
It is inferred as
unknownAdditional information
No response