Skip to content
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

Merged
merged 6 commits into from
Apr 4, 2021

Conversation

arpitBhalla
Copy link
Member

@arpitBhalla arpitBhalla commented Mar 30, 2021

  • Button
  • FAB
  • Checkbox
  • Badge
  • Divider
  • Icon
  • Input
  • LinearProgress
  • SearchInput (except iOS SearchBar)
  • Social Icon
  • Pricing
  • Tile
  • ThemeProvider
  • withTheme

@codecov
Copy link

codecov bot commented Mar 30, 2021

Codecov Report

Merging #2930 (90e07f2) into next (d78718c) will decrease coverage by 5.19%.
The diff coverage is 62.82%.

❗ Current head 90e07f2 differs from pull request most recent head 06d7614. Consider uploading reports for the commit 06d7614 to get more accurate results
Impacted file tree graph

@@            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     
Impacted Files Coverage Δ
src/badge/Badge.tsx 100.00% <ø> (ø)
src/config/ThemeProvider.tsx 100.00% <ø> (ø)
src/divider/Divider.tsx 100.00% <ø> (ø)
src/linearProgress/LinearProgress.tsx 60.86% <0.00%> (ø)
src/tile/Tile.tsx 100.00% <ø> (ø)
src/slider/Slider.tsx 58.91% <56.25%> (-29.52%) ⬇️
src/social/SocialIcon.tsx 96.66% <80.00%> (+0.11%) ⬆️
src/buttons/Button.tsx 87.80% <100.00%> (ø)
src/buttons/ButtonGroup.tsx 97.82% <100.00%> (ø)
src/buttons/FAB.tsx 50.00% <100.00%> (ø)
... and 9 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d78718c...06d7614. Read the comment docs.

@arpitBhalla arpitBhalla marked this pull request as draft March 30, 2021 05:09
src/buttons/FAB.tsx Outdated Show resolved Hide resolved
@arpitBhalla arpitBhalla marked this pull request as ready for review March 31, 2021 06:28
@@ -220,7 +220,7 @@ const styles = StyleSheet.create({
},
verticalContainer: {
flexDirection: 'column',
height: null,
height: undefined,
Copy link
Collaborator

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.

Copy link
Member Author

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

Copy link
Collaborator

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.

Copy link
Member Author

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

@flyingcircle flyingcircle merged commit 49f97d8 into react-native-elements:next Apr 4, 2021
@arpitBhalla arpitBhalla deleted the strict-ts branch April 5, 2021 04:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants