Type Mismatch Error in Effect.runPromise Usage

What is wrong with this way of running an effect?
const photos = await Effect.runPromise(
  pipe(
    Effect.gen(function* (_) {
      return yield* PhotoService.listPhotos();
    }),
    Effect.provide(PhotoServiceLive)
  )
);

It says
Argument of type 'Effect<{ readonly url: string; readonly likes: number; readonly id: string; readonly user_id: string; readonly description?: string | undefined; readonly thumbnailUrl: string; readonly sourceSet: { ...; }; }[], unknown, unknown>' is not assignable to parameter of type 'Effect<{ readonly url: string; readonly likes: number; readonly id: string; readonly user_id: string; readonly description?: string | undefined; readonly thumbnailUrl: string; readonly sourceSet: { ...; }; }[], unknown, never>' with 'exactOptionalPropertyTypes: true'. Consider adding 'undefined' to the types of the target's properties.
  Type 'unknown' is not assignable to type 'never'.ts(2379)
Was this page helpful?