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

Migrate app/react-native to typescript #6448

Merged
merged 10 commits into from
Apr 16, 2019
Merged

Conversation

benoitdion
Copy link
Member

@benoitdion benoitdion commented Apr 7, 2019

Issue: #5030

What I did

Migrate app/react-native to typescript. Most types have been annotated properly except for the data we get from client-api.

@benoitdion benoitdion added maintenance User-facing maintenance tasks react-native typescript labels Apr 7, 2019
@vercel
Copy link

vercel bot commented Apr 7, 2019

This pull request is automatically deployed with Now.
To access deployments, click Details below or on the icon next to each push.

Latest deployment for this branch: https://monorepo-git-react-native-typescript.storybook.now.sh

@benoitdion benoitdion marked this pull request as ready for review April 8, 2019 11:27
@codecov
Copy link

codecov bot commented Apr 8, 2019

Codecov Report

Merging #6448 into next will decrease coverage by 0.06%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##             next    #6448      +/-   ##
==========================================
- Coverage   41.09%   41.03%   -0.07%     
==========================================
  Files         612      613       +1     
  Lines        8444     8457      +13     
  Branches      411      437      +26     
==========================================
  Hits         3470     3470              
- Misses       4919     4932      +13     
  Partials       55       55
Impacted Files Coverage Δ
...view/components/OnDeviceUI/navigation/constants.ts 0% <ø> (ø)
...c/preview/components/OnDeviceUI/navigation/bar.tsx 0% <ø> (ø)
...onents/OnDeviceUI/navigation/visibility-button.tsx 0% <ø> (ø)
...native/src/preview/components/OnDeviceUI/panel.tsx 0% <ø> (ø)
...viceUI/absolute-positioned-keyboard-aware-view.tsx 0% <ø> (ø)
...preview/components/OnDeviceUI/navigation/index.tsx 0% <ø> (ø)
...e/src/preview/components/OnDeviceUI/addons/tab.tsx 0% <ø> (ø)
...review/components/OnDeviceUI/navigation/button.tsx 0% <ø> (ø)
app/react-native/src/index.ts 0% <0%> (ø)
...c/preview/components/OnDeviceUI/addons/wrapper.tsx 0% <0%> (ø)
... and 38 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 e50ba94...7942fbe. Read the comment docs.

@codecov
Copy link

codecov bot commented Apr 8, 2019

Codecov Report

Merging #6448 into next will decrease coverage by 0.01%.
The diff coverage is 2.32%.

Impacted file tree graph

@@            Coverage Diff             @@
##             next    #6448      +/-   ##
==========================================
- Coverage   40.81%   40.79%   -0.02%     
==========================================
  Files         616      616              
  Lines        8519     8525       +6     
  Branches      535      595      +60     
==========================================
+ Hits         3477     3478       +1     
- Misses       4950     4955       +5     
  Partials       92       92
Impacted Files Coverage Δ
...view/components/OnDeviceUI/navigation/constants.ts 0% <ø> (ø)
...c/preview/components/OnDeviceUI/navigation/bar.tsx 0% <ø> (ø)
...onents/OnDeviceUI/navigation/visibility-button.tsx 0% <ø> (ø)
addons/knobs/src/KnobManager.js 53.48% <ø> (ø) ⬆️
...native/src/preview/components/OnDeviceUI/panel.tsx 0% <ø> (ø)
...viceUI/absolute-positioned-keyboard-aware-view.tsx 0% <ø> (ø)
...e/src/preview/components/OnDeviceUI/addons/tab.tsx 0% <ø> (ø)
...review/components/OnDeviceUI/navigation/button.tsx 0% <ø> (ø)
app/react-native/src/index.ts 0% <0%> (ø)
...c/preview/components/OnDeviceUI/addons/wrapper.tsx 0% <0%> (ø)
... and 19 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 904bfed...29ddf5a. Read the comment docs.

};
}
interface Props {
initialUiVisible: boolean;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to ea0c8a0#diff-46b88ac54083f1f8e54a54e6f4a3088fL77
initialUiVisible is optional so maybe initialUiVisible?: boolean; is more accurate

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch

@@ -1,8 +1,7 @@
import React, { PureComponent } from 'react';
import { View, SafeAreaView, StyleSheet } from 'react-native';
// @ts-ignore TODO: add types for react-native-swipe-gestures
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or add a typings.d.ts with declare module 'react-native-swipe-gestures' if types are not available for this lib 😉

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added in 29ddf5a

`navigator.userAgent` is not defined in react-native
`document.location` is not defined in react-native.

Fixes #6512
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance User-facing maintenance tasks react-native typescript
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants