-
Notifications
You must be signed in to change notification settings - Fork 403
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(store): disallow nullable actions in dispatch()
#2221
fix(store): disallow nullable actions in dispatch()
#2221
Conversation
☁️ Nx Cloud ReportCI is running/has finished running commands for commit c6aadd2. As they complete they will appear below. Click to see the status, the terminal output, and the build insights. 📂 See all runs for this CI Pipeline Execution ✅ Successfully ran 4 targetsSent with 💌 from NxCloud. |
I adopted your change in one of the apps, but the build is now failing with |
To adopt this change in a more user-friendly manner, we should include a check guarded by |
8be71a3
to
4311fef
Compare
commit: |
BundleMonFiles updated (1)
Unchanged files (5)
Total files change +584B +0.44% Groups updated (2)
Final result: ❌ View report in BundleMon website ➡️ |
BundleMon (NGXS Plugins)Unchanged files (9)
No change in files bundle size Unchanged groups (1)
Final result: ✅ View report in BundleMon website ➡️ |
BundleMon (Integration Projects)Files updated (1)
Unchanged files (2)
Total files change +66B +0.03% Final result: ✅ View report in BundleMon website ➡️ |
4311fef
to
6f66858
Compare
dispatch()
f754706
to
40be833
Compare
In this commit, we update the `dispatch()` implementation to account for nullable parameters. For example, `dispatch(null)` is invalid because `null` is not a valid action. We provide both runtime and compile-time checks. The runtime check is the code that throws an error when the provided argument is nullable, while the compile-time check is a type that excludes nullable types.
61bb1ab
to
533a8f8
Compare
Code Climate has analyzed commit c6aadd2 and detected 0 issues on this pull request. The test coverage on the diff in this pull request is 100.0% (50% is the threshold). This pull request will bring the total coverage in the repository to 95.4% (0.0% change). View more on Code Climate. |
In this commit, we update the
dispatch()
implementation to account for nullable parameters.For example,
dispatch(null)
is invalid becausenull
is not a valid action.We provide both runtime and compile-time checks. The runtime check is the code that throws an error
when the provided argument is nullable, while the compile-time check is a type that excludes
nullable types.