reactjs / react-transition-group

An easy way to perform animations when a React component enters or leaves the DOM
https://reactcommunity.org/react-transition-group/
Other
10.15k stars 650 forks source link

refactor: migrate `src/` to TypeScript #809

Closed koba04 closed 2 years ago

koba04 commented 2 years ago

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.

eps1lon commented 2 years ago

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 commented 2 years ago

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

koba04 commented 2 years ago

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