I am using GSAP in React with Typescript and was wondering how I can store the GSAP tween variables in separate variable. I can still do something like the code below but it'll be nice if I am able to access the type for these tween variables, this way I'll be able to use Intellisense for easier code writing.
const tweenVar = {
opacity: 0,
x: 250,
ease: "sine.out",
duration: 1,
};
gsap.from(pageRef.current, tweenVar);
On hovering over fromI can see the type to be