(fn: () => Promise<A>)
| 63 | (cause as { readonly status: unknown }).status === 404; |
| 64 | |
| 65 | const noneWhenGone = <A>(fn: () => Promise<A>) => |
| 66 | Effect.tryPromise({ try: fn, catch: (cause) => cause }).pipe( |
| 67 | Effect.map(Option.some), |
| 68 | Effect.catch((cause) => |
| 69 | isNotFound(cause) ? Effect.succeed(Option.none<A>()) : Effect.fail(cause), |
| 70 | ), |
| 71 | ); |
| 72 | |
| 73 | // One pass is bounded by the replay's page budget; loop until the stream |
| 74 | // is drained, another run owns it, or the backfill has not run. |
no test coverage detected