(entry: Entry)
| 5549 | |
| 5550 | // -- state ------------------------------------------------------------------ |
| 5551 | const isStale = (entry: Entry): boolean => |
| 5552 | settleOnce |
| 5553 | ? entry.result === undefined |
| 5554 | : entry.result === undefined || entry.result._tag === "Failure" || |
| 5555 | entry.invalidated || |
| 5556 | // A live stream keeps its entry fresh. |
| 5557 | (entry.live === undefined && |
| 5558 | now() - entry.settledAt >= entry.def.staleMs) |
| 5559 | const hasLive = (entry: Entry): boolean => entry.patches.some((patch) => patch.live) |
| 5560 | /** Inside the fetch-free window, a hydrated entry. */ |
| 5561 | const inWindow = (entry: Entry): boolean => windowOpen && entry.hydrated |
no test coverage detected