Issue with `Effect.repeat` returning Duration instead of Response

Very silly question, why I get Duration instead of json? I expect to repeat
fetch
maximum 3 times with exponential delay between retries. It works fine without the Scheduler

import { Effect, Schedule } from "effect";

const response =
  Effect.tryPromise(() =>
    fetch("https://arr")
  ).pipe(
    Effect.repeat({
      until: _ => _.ok,
      times: 3,
      schedule: Schedule.exponential("1 second")
    }),
    Effect.andThen(_ => _.json() ) // _ == Duration ???
  )
Was this page helpful?