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
refactor(runtime): strictNullChecks fixes #336
Conversation
Code Climate has analyzed commit b000aa2 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 92.5% (0.0% change). View more on Code Climate. |
Codecov Report
@@ Coverage Diff @@
## master #336 +/- ##
==========================================
- Coverage 92.03% 92.03% -0.01%
==========================================
Files 81 81
Lines 7975 7972 -3
Branches 1295 1295
==========================================
- Hits 7340 7337 -3
Misses 635 635
Continue to review full report at Codecov.
|
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.
LGTM
this.isMulti = expressions.length > 1; | ||
this.firstExpression = expressions[0]; | ||
this.isMulti = this.expressions.length > 1; | ||
this.firstExpression = this.expressions[0]; |
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.
Imo, it should be
expressions = expressions || PLATFORM.emptyArray;
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.
The API contract specifies "array or undefined", why use (slower) coercion instead of strict equality?
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.
We still need some Minimizer friendliness. So it can be still strict, just with expression
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.
I think we can tackle minimizer friendliness with AOT. There are a lot of parts in the framework that still have a long way to go in this area.
Pull Request
π Description
Refactoring
runtime
to adhere more tostrictNullChecks
.π« Issues
Part of #254.
π©βπ» Reviewer Notes
This is just a partial fix, but I decided to get some of the low hanging fruit out of the way first, before going for the bigger changes.
π Test Plan
Trust in CircleCI.
β Next Steps
Do the rest and turn the options on by default in the
tsconfig
files.