-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Avoid typescript warning when no roles key is supplied #6060
Conversation
☁️ Nx Cloud ReportCI is running/has finished running commands for commit 4707b98. As they complete they will appear below. Click to see the status, the terminal output, and the build insights. 📂 See all runs for this branch ✅ Successfully ran 14 targets
Sent with 💌 from NxCloud. |
✅ Deploy Preview for redwoodjs-docs canceled.
|
BTW – Currently, the method throws when called without any argument, so one always has to supply Hence, my suggestion / wish for v3.0 would be to change this method from destructuring to simply use a discrete argument. The Would love to hear the core-team's thoughts on this. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this fix, that make sense!
@simoncrypta Actually #6110 fixed the limitation i described, which is awesome, now we can simply pass Now there's really no big gain in changing the method signature of |
Line 108 indicates that this method can be used without supplying roles at all:
redwood/packages/cli/src/commands/setup/auth/templates/dbAuth.auth.ts.template
Line 108 in 4707b98
However, this would trigger a typescript warning:
This fixes it.