The best way to control Claude Code, Codex and more from any computer or phone

main
ts 12 lines 429 Bytes
Raw
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;