Skip to content

Remove utility functions from result module#38

Open
richshaw wants to merge 1 commit intomainfrom
claude/loving-archimedes-VHP3k
Open

Remove utility functions from result module#38
richshaw wants to merge 1 commit intomainfrom
claude/loving-archimedes-VHP3k

Conversation

@richshaw
Copy link
Copy Markdown
Owner

@richshaw richshaw commented May 3, 2026

Summary

This PR removes several utility functions from the result module that are no longer needed or have been moved elsewhere.

Changes

  • Removed isOk() type guard function
  • Removed isErr() type guard function
  • Removed unwrap() function for extracting values from Result types
  • Removed tryAsync() helper for wrapping async operations in Result types

These functions were part of the public API but are being deprecated in favor of alternative implementations or patterns.

https://claude.ai/code/session_01LxXGg24JhSve6YvC37gEZy

isOk, isErr, unwrap, and tryAsync were exported but never imported
anywhere in the codebase.

https://claude.ai/code/session_01LxXGg24JhSve6YvC37gEZy
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR simplifies the src/lib/result module by removing previously-exported helper utilities, leaving only the core Result/Ok/Err types and ok()/err() constructors.

Changes:

  • Removed isOk() and isErr() type guard helpers.
  • Removed unwrap() helper that threw on Err.
  • Removed tryAsync() helper for wrapping async operations into Result.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants