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: make notFound() and redirect() return never #25

Merged
merged 1 commit into from
Sep 22, 2021

Conversation

itsMapleLeaf
Copy link
Collaborator

The reason being is you can't actually give JSON to these functions, and the page goes away when these happen, so it's logically the same as throwing

It also cleans up unions; before, an empty object type could show up in the props type, but never "dissolves" itself in unions

@itsMapleLeaf itsMapleLeaf added the 🔧 internal A change that doesn't involve end users label Sep 22, 2021
@itsMapleLeaf itsMapleLeaf self-assigned this Sep 22, 2021
Base automatically changed from feature/overhaul to main September 22, 2021 07:18
The reason being is you can't actually give JSON to these types, and the page goes away when these happen, so it's logically the same as throwing

It also cleans up unions; before, an empty object type could show up in the props type, but `never` "dissolves" itself in unions
@smeijer smeijer changed the title fix: notFound() and redirect() should return never fix: make notFound() and redirect() return never Sep 22, 2021
@smeijer smeijer merged commit d31dbe1 into main Sep 22, 2021
@smeijer smeijer deleted the improved-release-types branch September 22, 2021 07:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔧 internal A change that doesn't involve end users
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants