Closed naranjamecanica closed 4 years ago
Tween and Timeline aren't exported because we thought it might cause name conflicts with other libraries. https://github.com/greensock/GSAP/issues/318#issuecomment-553250162
There is a global type for a Tween, GSAPTween
. But I don't know if that will help you as I'm not familiar with that error.
And you should be able to augment the types with your own d.ts file. Something like this.
declare module "gsap/gsap-core" {
export class Tween extends gsap.core.Tween {}
}
Thanks the augmenting worked! Had some issues, but that was because my definition file was called gsap.d.ts
.
I'm using a wrapper around your library in Typescript.
When I export and generate declaration files for Typescript I get to following error:
Is it possible to export a
Tween
const from the types like you do withTweenMax
andTweenLite
etc ingsap-core.d.ts
?Something like:
export class Tween extends gsap.core.Tween {}