Skip to content

Return type of the gsap.parseEase function. #630

@pedramp

Description

@pedramp

Hi,

I just ran into a Type issue and thought it would be better to share.

The parseEase here has two return types: EaseFunction and EaseMap. The EaseMap is used when the function doesn’t have any input.

However, when you call parseEase without specifying an easing, like:

gsap.parseEase('Bounce');
gsap.parseEase('Power2');
gsap.parseEase('Back');

it actually returns what looks like an Ease object, which has easeIn, easeOut, and easeInOut properties, for example:

{ easeIn: ƒ, easeOut: ƒ, easeInOut: ƒ }

It seems to me that the parseEase function needs an override to support Ease in its return type.

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