Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Result objects #364

Open
curtis-h opened this issue Jan 29, 2025 · 0 comments
Open

Result objects #364

curtis-h opened this issue Jan 29, 2025 · 0 comments
Labels
enhancement New feature or request

Comments

@curtis-h
Copy link
Contributor

curtis-h commented Jan 29, 2025

Proposed feature

Move towards returning "Result" objects, instead of simple values.
This should allow us to create a more consistent interface for success, failure and error cases, instead of being a combination of values and exceptions.

Feature description

A "Result" may look something like:

interface Result<T> {
  ok: boolean;
  data: T;
  err?: Error;
}

This should allow us to provide more information and context about the return state, which could be particularly valuable in places like Verification.

@curtis-h curtis-h added the enhancement New feature or request label Jan 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant