joshwcomeau / react-flip-move

Effortless animation between DOM changes (eg. list reordering) using the FLIP technique.
http://joshwcomeau.github.io/react-flip-move/examples
MIT License
4.09k stars 258 forks source link

Add typescript definition #160

Closed Hypnosphi closed 7 years ago

Hypnosphi commented 7 years ago

Fixes #159

joshwcomeau commented 7 years ago

Oh man I am in no position to be reviewing this, haha. I've never used Typescript.

Unless someone else sees this in the next few hours and has notes, I'm cool to merge and publish this along with #158. Because it doesn't touch the main src code, I'm confident it won't break anything for regular users. If Typescript users have issues with the typings, we can always patch it in subsequent releases.

vsaarinen commented 7 years ago

Unfortunately, it looks like this doesn't work since the typings file is not included in the NPM package. package.json refers to typings/react-flip-move.d.ts but the typings/ folder doesn't exist:

$ ls -l node_modules/react-flip-move/
total 40
-rw-r--r--   1 ville  staff  1088 May 10 14:50 LICENSE.md
-rw-r--r--   1 ville  staff  9447 May 25 02:31 README.md
drwxr-xr-x   4 ville  staff   136 May  4 12:37 dist
drwxr-xr-x  20 ville  staff   680 May 17 09:20 lib
-rw-r--r--   1 ville  staff  3222 May 25 03:27 package.json
drwxr-xr-x  12 ville  staff   408 May 17 09:20 src
Hypnosphi commented 7 years ago

Oh, that's a shame . Thanks for noting that!