-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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 typing on useArgs #18122
fix typing on useArgs #18122
Conversation
☁️ Nx Cloud ReportCI is running/has finished running commands for commit 787fd9b. 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 1 targetSent with 💌 from NxCloud. |
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.
Looks good! Thank you @annacc-everlaw
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.
Ack, OK I'll get it building. Thanks for looking at it! |
@MichaelArestad Heya Michael, sorry for the delay, just pushed a commit addressing the issue. Thanks again for looking at this! |
One more change, let me know if it's ok! |
Bump! |
Hey @MichaelArestad , not sure if there's anything more you need from me here! Thanks. |
Don't know what I need to do here, if anything. Any guidance would be appreciated! Thanks |
Hey @annacc-everlaw. I will have someone take a look at this at the next weekly triage (Monday). Sorry for the delay! |
Co-authored-by: Michael Shilman <[email protected]>
GItHub won't let me update to this PR, so I'll re-create it. |
Weird! Thanks for getting it merged! : ) |
Issue:
useArgs
is typed incorrectly.What I did
Fixed
useArgs
to take a type parameter,P
, which should be the type of the args for your story. By default, it's set toArgs
so that it's backwards compatible. Additionally, fixed theresetArgs
function to be a(string[]) => void
rather than a([string]) => void
, as a[string]
makes no sense in this context (and is incorrect).How to test
This is just a type change, so this can be tested by ensuring that things are typed correctly in your story when using
useArgs<YourStoryArgType>
.If your answer is yes to any of these, please make sure to include it in your PR.