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

enhance: Better TypeScript errors when params don't match shape #211

Merged
merged 2 commits into from Dec 23, 2019

Conversation

ntucker
Copy link
Collaborator

@ntucker ntucker commented Dec 23, 2019

Fixes #210 .

Motivation

Previously type mismatches gave incredibly long and confusing error messages because it was trying to explain the mismatch based on FetchShape.

Solution

By setting FetchShape's generic first, we can ensure typescript will give errors based on the params themselves.

@ntucker ntucker merged commit 2af967b into master Dec 23, 2019
@ntucker ntucker deleted the type-fix branch December 23, 2019 17:11
@ntucker ntucker changed the title Type fix enhance: Better TypeScript errors when params don't match shape Dec 23, 2019
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.

Type mismatches on params give confusing error
1 participant