diff options
| author | amankumarsingh77 <amankumarsingh7702@gmail.com> | 2026-07-28 21:47:21 +0530 |
|---|---|---|
| committer | Aman Kumar <145339995+amankumarsingh77@users.noreply.github.com> | 2026-08-02 19:12:46 +0530 |
| commit | aedbb88a8025851067be9f77ec406b29d65599a8 (patch) | |
| tree | 8e62b333e4aad20998056614e19acd34ff6abc3b /src/util/result.ts | |
| parent | ea11182a0e8cb62d208b5b53a60c98c8bdef9e9a (diff) | |
refactor: delete exports and knobs that nothing calls
isInternalUrl, SPECIAL_KEYS, andThen and mapErr had no callers in src or
test. BrowserState.remoteBrowserId was parsed on restore and never
written — the field that is actually read lives on DaemonStatus.
IpcServer.disconnectClient and IpcServer.clients() were unreachable, as
was EventRouter.allClients and a write-only lineCount counter.
DAEMON_STALE_SOCKET_CLEANUP was a hardcoded true with an if around it, so
the unlink now runs unconditionally.
CdpBridge.isAlive and getSessionOwner look equally dead from src/ alone,
but test/manual/bridge-test.ts drives both — they are the only seams that
suite has, so they stay.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'src/util/result.ts')
| -rw-r--r-- | src/util/result.ts | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/src/util/result.ts b/src/util/result.ts index ca57c2a..d57fea7 100644 --- a/src/util/result.ts +++ b/src/util/result.ts @@ -7,9 +7,3 @@ export const err = <E>(error: E): Result<never, E> => ({ success: false, error } export const map = <T, U, E>(r: Result<T, E>, f: (t: T) => U): Result<U, E> => r.success ? ok(f(r.data)) : r; - -export const andThen = <T, U, E>(r: Result<T, E>, f: (t: T) => Result<U, E>): Result<U, E> => - r.success ? f(r.data) : r; - -export const mapErr = <T, E, F>(r: Result<T, E>, f: (e: E) => F): Result<T, F> => - r.success ? r : err(f(r.error)); |
