Jump to content


Timeline Class Incomplete Typescript Definitions

Recommended Posts

I am working on a Typescript PIXI project, using GreenSock as my animation engine, and in setting up a function to jump to a specific label in a Timeline, my IDE complained that the play() function only accepts numbers...


A check of the Typescript definitions shows that Timeline inherits from Animation, and sure enough, in the interface for the Animation class, play() is defined as: 


play(from?: number | null, supressEvents?: boolean): this;

I'm assuming, that if I update the definition to:

play(from?: number | string | null, supressEvents?: boolean): this;

...things should work as expected and the timeline will play from a defined label.

I haven't yet verified that this works as it should,  but I will report back if I overlooked something and this fails.

Link to comment
Share on other sites

Hello and thanks for catching that. I've made sure that this is fixed in the next version to be released next week.

  • Like 2
Link to comment
Share on other sites

My pleasure! Looking forward to the release! 🙂

  • Like 1
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.