Skip to content

refactor: migrate src/ to TypeScript #809

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

Merged
merged 9 commits into from
Apr 5, 2022
Merged

refactor: migrate src/ to TypeScript #809

merged 9 commits into from
Apr 5, 2022

Conversation

koba04
Copy link
Member

@koba04 koba04 commented Mar 21, 2022

I've migrated all JS files in src/ to TypeScript.
This doesn't create .d.ts files, so I'll work on it as a subsequent PR.

Some implementations were hard to type. I've put @ts-expect-error comments for them and expect them to be fixed later.
I also won't fix errors by the propTypes definitions because I'll remove propTypes support in the future release.

This is a starting point for TypeScript migration and I expect the types to get better.

@koba04 koba04 changed the title refactor: migrate from JavaScript to TypeScript refactor: migrate to TypeScript Mar 21, 2022
@koba04 koba04 changed the title refactor: migrate to TypeScript refactor: migrate src/ to TypeScript Apr 3, 2022
@koba04 koba04 marked this pull request as ready for review April 4, 2022 15:13
@koba04 koba04 requested a review from eps1lon April 4, 2022 15:13
@eps1lon
Copy link
Member

eps1lon commented Apr 4, 2022

Can you reduce the diffs of the files that are not properly recognized as movied? It's IMO fine if we use a lot of any for now. It's more important that the default git config recognizes these as renames and not remove+add.

@koba04
Copy link
Member Author

koba04 commented Apr 5, 2022

After this PR has been merged, I'll update ReplaceTransition to https://gist.github.com/koba04/5575ded08b7ece5ca5326c797949d653

@koba04
Copy link
Member Author

koba04 commented Apr 5, 2022

@eps1lon Thank you for your feedback; I've made all changes as renames.

Copy link
Member

@eps1lon eps1lon left a comment

Choose a reason for hiding this comment

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

Awesome!

@koba04 koba04 merged commit 20da786 into alpha Apr 5, 2022
@koba04 koba04 deleted the migrate-to-ts branch April 5, 2022 16:12
koba04 added a commit that referenced this pull request May 3, 2022
* build: add tsx files as targets of Babel

* refactor: migrate ChildMapping to TypeScript

* refactor: add types for TransitionGroupContext

* refactor: migrate SwitchTransition to TypeScript

* refactor: migrate Transition to TypeScript

* refactor: migrate CSSTransition to TypeScript

* refactor: migrate TransitionGroup to TypeScript

* refactor: migrate ReplaceTransition to TypeScript

* chore: update size-snapshot
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