GSAP
GSAP copied to clipboard
export TweenVars type
Please export the TweenVars type so that the configuration can be reused. Right now, due to the two overloaded to functions, TypeScript can't correctly infer the type using Parameters.
function to(targets: TweenTarget, vars: TweenVars): core.Tween;
function to(targets: TweenTarget, duration: number, vars: TweenVars): core.Tween;
type TweenVars = Parameters<typeof gsap.to>[1];
...
{ease}
^
TS2339: Property ease does not exist on type Number
I see that the second overloaded to function is deprecated, but it would be preferable to get the type directly without relying on any workarounds.
you can use TweenVars from gsap
import gsap from 'gsap'
let animation: gsap.TweenVars;
@Timi-Leyin gsap.TweenVars isn't exported
@monolithed I’d like to work on it. Could you please assign it to me?
We'll add that export in the next release. Thanks for pointing it out.