-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Strict TypeScript #2929 #2930
Strict TypeScript #2929 #2930
Conversation
arpitBhalla
commented
Mar 30, 2021
•
edited
Loading
edited
- Button
- FAB
- Checkbox
- Badge
- Divider
- Icon
- Input
- LinearProgress
- SearchInput (except iOS SearchBar)
- Social Icon
- Pricing
- Tile
- ThemeProvider
- withTheme
Codecov Report
@@ Coverage Diff @@
## next #2930 +/- ##
==========================================
- Coverage 88.20% 83.01% -5.20%
==========================================
Files 50 50
Lines 1009 1048 +39
Branches 399 402 +3
==========================================
- Hits 890 870 -20
- Misses 76 137 +61
+ Partials 43 41 -2
Continue to review full report at Codecov.
|
src/buttons/ButtonGroup.tsx
Outdated
@@ -220,7 +220,7 @@ const styles = StyleSheet.create({ | |||
}, | |||
verticalContainer: { | |||
flexDirection: 'column', | |||
height: null, | |||
height: undefined, |
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.
This actually changes the behavior of the component. We should either turn off the null check in the tsconfig or find a different solution.
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 tried in demo app, it was working fine, but if it really results in some weired behaviour we can add "strictNullChecks": false
in the end
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.
Yeah, it might just be a corner case, but I do know that width
and height
being set to null
have a special meaning apart from undefined
. At least for TS changes, it safest to try not to change any of the JS code. There might be a Stackoverflow though that talks about how to handle this situation.
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 will check for best solution