Search code examples
npmtypescriptgsap

TweenLite Typescript import


I downloaded the GSAP package by npm and now I want to import TweenLite class to my app by TypeScript. It can be done by importing all GSAP by writing require('gsap'); and it works well. But in TypeScript it doesn't work. I want to do it like this: import TweenLite from 'gsap';.

Is it possible?


Solution

  • Found answer here. Actually if you want to do this then you need write definitions for library. The answer from the link provide link to git repository that contains what I was needed. You can find it here.