From 00df4fb8b1a27f0542ba737fd398f31a36186738 Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 3 May 2026 00:26:54 +0000 Subject: [PATCH] Remove unused Result helper functions isOk, isErr, unwrap, and tryAsync were exported but never imported anywhere in the codebase. https://claude.ai/code/session_01LxXGg24JhSve6YvC37gEZy --- src/lib/result.ts | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/src/lib/result.ts b/src/lib/result.ts index 6d5c0c3..eac5a26 100644 --- a/src/lib/result.ts +++ b/src/lib/result.ts @@ -10,23 +10,3 @@ export function err(error: E): Err { return { ok: false, error }; } -export function isOk(r: Result): r is Ok { - return r.ok; -} - -export function isErr(r: Result): r is Err { - return !r.ok; -} - -export function unwrap(r: Result): T { - if (r.ok) return r.value; - throw new Error(`unwrap on Err: ${JSON.stringify(r.error)}`); -} - -export async function tryAsync(fn: () => Promise): Promise> { - try { - return ok(await fn()); - } catch (e) { - return err(e); - } -}