-
Notifications
You must be signed in to change notification settings - Fork 116
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
chore: Upgrades app to modern Typescript #375
Conversation
Also updates the UsefulLinks class to a functional component
Fix the CompletedFilesCounter test
amazing! we've been wanting to move it to TS for a while now. Allow me a couple of days because I'm on holidays, and I will review it on Wednesday 👍. |
No worries. The conversion to typescript found quite a few small bugs... typos, prop type mismatches, etc... so i fixed them! I've |
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.
looks great!
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.
changing to avoid accidental merge
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.
changing to avoid accidental merge
When running `yarn start`, the console would complain: WARNING in ./node_modules/react-diff-view/es/index.js Module Warning (from ./node_modules/source-map-loader/dist/cjs.js): Failed to parse source map from ‘~/react-native-upgrade-helper/node_modules/react-diff-view/src/utils/parse.ts' file: Error: ENOENT: no such file or directory, open ‘~/react-native-upgrade-helper/node_modules/react-diff-view/src/utils/parse.ts'
@@ -1,5 +1,5 @@ | |||
import React, { Fragment } from 'react' | |||
import { ReleaseT } from '../types' | |||
import type { ReleaseT } from '../types' |
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.
is that needed? ts is smart enough to know this, right?
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.
Just a style preference. The TS compiler knows the difference.
While week on the topic, want are your thoughts on using the linter to enforce import order?
Nice, thank you! If there is nothing else here, I will merge in a couple hours. |
Summary
This PR converts the entire app to modern typescript. Along with this comes a lot of package upgrades now that
react-diff-view
andframer-motion
support typescriptThis addresses the Typescript support item in #108
Test Plan
yarn test
runs and passesyarn typecheck
command and added it to the github workflowyarn test-e2e
is failing locally for me.Checklist
README.md
(if needed)