1000ship / react-scroll-motion

🎞 Easy to make scroll animation
https://1000ship.github.io/react-scroll-motion
MIT License
422 stars 47 forks source link

In typescript using batch gives an error #16

Closed namratasaun closed 2 years ago

namratasaun commented 2 years ago

I get this type error when I try to use batch with multiple animations Type error: Expected 1 arguments, but got 2. image

In my local, in the AnimationTool.d.ts file that gets created I have changed export declare const batch: (animations_0: IAnimation) => IAnimation; to export declare const batch: ( ...animations: IAnimation[]) => IAnimation;

Testing - have cloned your code, changed the above line, ran npm run build, took the dist folder, replaced it in the react project. It is working perfectly.

namratasaun commented 2 years ago

@1000ship please consider this

1000ship commented 2 years ago

OMG. When I wrote this code, I might be not good at typescript that much. Thank you for PR

nsaun-dq commented 2 years ago

Thanks a lot for being so kind. Kudos to this great library.