Skip to content

export TweenVars type #620

@monolithed

Description

@monolithed

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions