Share Posted March 13 If GSAP is imported into at least one file, it is then defined in every file including where it shouldn't be. This also happens to all the plugins. Here's a code sandbox that hopefully illustrates the issue a bit better: https://codesandbox.io/s/gsap-import-types-p88m1x?file=/src/App.tsx (btw, you need to open both files, see the note in the sandbox for why) In that sandbox, I would expect a type error at compile time but instead get a reference error at runtime. The setup here is pretty minimal, but have I set up GSAP incorrectly here? Link to comment Share on other sites More sharing options...
Share Posted March 13 I'm a bit confused, @RJWadley, about why you're not importing GSAP properly in your App.tsx file (you commented it out, right?) Can you help me understand what your goal is there by omitting it? This certainly sounds more like a TypeScript question (I'm not much of a TypeScript guy). TypeScript definitions are included in the NPM package. Is there a GSAP-specific question we could help with? Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now