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(ts): handleMiddleware return type can be NextMiddlewareResult #4818

Merged

Conversation

terrierscript
Copy link
Contributor

☕️ Reasoning

Current withAuth return Promise<any> but actually maybe handleMiddleware return only NextMiddleware result.

I append NextMiddlewareResult with ReturnType because NextMiddlewareResult is defined in next.js but this type is not exported.

🧢 Checklist

  • Documentation
  • Tests
  • Ready to be merged

🎫 Affected issues

Please scout and link issues that might be solved by this PR.

Fixes: INSERT_ISSUE_LINK_HERE

📌 Resources

@vercel
Copy link

vercel bot commented Jul 2, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
next-auth ✅ Ready (Inspect) Visit Preview Jul 9, 2022 at 7:46AM (UTC)

@github-actions github-actions bot added the core Refers to `@auth/core` label Jul 2, 2022
Copy link
Collaborator

@ubbe-xyz ubbe-xyz left a comment

Choose a reason for hiding this comment

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

Thanks 🙌🏽

@vercel vercel bot temporarily deployed to Preview July 3, 2022 21:43 Inactive
@vercel vercel bot temporarily deployed to Preview July 5, 2022 13:30 Inactive
@vercel vercel bot temporarily deployed to Preview July 9, 2022 07:46 Inactive
@balazsorban44 balazsorban44 merged commit 8853000 into nextauthjs:main Jul 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Refers to `@auth/core`
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants