Jump to content
GreenSock

RJWadley

ScrollSmoother.get() is not typed correctly (Typescript)

Moderator Tag

Recommended Posts

If a smoother hasn't been initialized, `ScrollSmoother.get()` will return undefined. This should be reflected in the typing of the get function.

 

The return type is currently `ScrollSmoother`, but it should be `ScrollSmoother | undefined`

See the Pen bGKpaWO?editors=0011 by RJWadley (@RJWadley) on CodePen

Link to comment
Share on other sites

Thanks for pointing that out, @RJWadley. We'll add that in the next 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.
×