Skip to content

Strict TypeScript #2929#2930

Merged
flyingcircle merged 6 commits into
react-native-elements:nextfrom
arpitBhalla:strict-ts
Apr 4, 2021
Merged

Strict TypeScript #2929#2930
flyingcircle merged 6 commits into
react-native-elements:nextfrom
arpitBhalla:strict-ts

Conversation

@arpitBhalla

@arpitBhalla arpitBhalla commented Mar 30, 2021

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

@codecov

codecov Bot commented Mar 30, 2021

Copy link
Copy Markdown

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
Comment thread src/buttons/FAB.tsx Outdated
@arpitBhalla arpitBhalla marked this pull request as ready for review March 31, 2021 06:28
Comment thread src/buttons/ButtonGroup.tsx Outdated
verticalContainer: {
flexDirection: 'column',
height: null,
height: undefined,

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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