Skip to content

Refactor and Document TryCatch Types #10

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

Merged
merged 9 commits into from
Apr 1, 2025
Merged

Conversation

maxmorozoff
Copy link
Owner

No description provided.

This improves:
- The `rest` type `[res, err, ...rest]` is now `never[]`.
- The `value` type in `tryCatch(...).map((value) => {})` is now `never`.
This improves:
- Strengthens type safety by preventing unintended array operations.

See: https://github.com/microsoft/TypeScript/issues/xyz for more context.
This improves:
- Provides clear descriptions for `Success`, `Failure`, `Result`, and related types.
- Documents generic parameters and return types for better type clarity.
- Enhances developer experience with detailed function annotations.
Copy link

changeset-bot bot commented Apr 1, 2025

🦋 Changeset detected

Latest commit: 73951e0

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@maxmorozoff/try-catch-tuple Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@maxmorozoff maxmorozoff merged commit e990d74 into main Apr 1, 2025
1 check passed
@maxmorozoff maxmorozoff deleted the try-catch-tuple/dev branch April 1, 2025 12:04
Copy link
Owner Author

@maxmorozoff maxmorozoff left a comment

Choose a reason for hiding this comment

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

Oops, forgot to insert valid link to the issue in db99a2d:

microsoft/TypeScript#42033

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.

1 participant