Jump to content
Search Community

Typescript Gsap using seek problem [Solved]

Kevonk test
Moderator Tag

Recommended Posts

Hi All,

I have been using Gsap with React-Typescript for awhile. I wanted to have an onclick button to skip to the next label and play from that label. 
On the Gsap documents, it says that seek can take a label or number. However, looking at animations.d.ts number is the only option out of the two.

Thus, is there a work around this?

I used "yarn add gsap" to install the module.

 

Edit: Solved by adding //@ts-ignore

2020-04-08 (1).png

Edited by Kevonk
  • Like 1
  • Thanks 1
Link to comment
Share on other sites

Hey Kevonk and welcome to the GreenSock forums!

 

The Typescript declarations are still a work in progress. I've corrected this error in my local copy but it likely won't be available in the production version until at least the next version release. Ignoring it is a good work around, or changing time: number to time: number | string.

  • Like 1
  • Thanks 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.
×
×
  • Create New...