The best way to control Claude Code, Codex and more from any computer or phone
Mirrored from https://github.com/Camo67/t3code.git
Synced Nov 21, 07:15 UTC
| 1 | import * as Effect from "effect/Effect"; |
| 2 | import type { LinkStoreError } from "./Links.ts"; |
| 3 | |
| 4 | /** Storage failures are defects: the platform turns them into a 500. */ |
| 5 | export const dieOnStore = <A, E, R>( |
| 6 | effect: Effect.Effect<A, E | LinkStoreError, R>, |
| 7 | ): Effect.Effect<A, Exclude<E, LinkStoreError>, R> => |
| 8 | Effect.catchTag( |
| 9 | effect as Effect.Effect<A, LinkStoreError, R>, |
| 10 | "LinkStoreError", |
| 11 | Effect.die, |
| 12 | ) as never; |