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

fix(types): type result for throwOnError responses #590

Merged
merged 5 commits into from
Jan 14, 2025

Conversation

avallete
Copy link
Member

@avallete avallete commented Jan 7, 2025

When using throwOnError(), the response type is now more strictly typed:

  • Data is guaranteed to be non-null
  • Response type is controlled by generic ThrowOnError boolean parameter

Fixes #563

When using throwOnError(), the response type is now more strictly typed:
- Data is guaranteed to be non-null
- Error field is removed from response type
- Response type is controlled by generic ThrowOnError boolean parameter

Fixes #563
@avallete avallete requested a review from soedirgo January 7, 2025 02:56
@soedirgo soedirgo merged commit 12faa3d into master Jan 14, 2025
1 check passed
@soedirgo soedirgo deleted the fix/throw-on-error-types-inference branch January 14, 2025 10:01
Copy link

🎉 This PR is included in version 1.17.11 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

.throwOnError() doesn't do typecheck
2 participants