Jump to content
Search Community

GSAP 3: import eases same as GSAP 2

avancamp test
Moderator Tag

Recommended Posts

Hi there,

 

I'm upgrading from GSAP 2 to GSAP 3 in a Typescript codebase. To retain strong typing and autocomplete, I actually liked having to import each ease object explicitly, as follows:

 

import {TweenLite, Power1} from 'gsap'

 

I would like to do the same in GSAP3. It appears that the actual library does export the ease objects, such that doing this would be supported:

 

import gsap, {Power1} from 'gsap'

 

However, the included typedef does not list these ease objects as part of the export. Is there a particular reason for this? Thanks!

Link to comment
Share on other sites

Hey avancamp and thanks for being a Business Green member - we couldn't do what we do without people like you!

 

The Typescript definitions are very much a work in progress. We welcome suggestions like this on them! GitHub might be better for tracking topics like this though. If you would, please make a new issue on the GSAP repo: https://github.com/greensock/GSAP/issues

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...