Share Posted March 4, 2019 Hi guys, i import the libs gsap from `npm` for only get @type description with intelisence. But each time i use the tweenLite or tweenMax, it add this line to top of my file import { TweenLite } from "gsap"; how i can remove this feature am pretty sure it comes from gsap because it not happen with my other npm libs @type . I use the npm only for get type description for intelisence, so i no need import each time i use it because am working on a node-webkit app, and i don't use import features, tweenlite are already injected in all the core app.. Also this should not happen because i exclude node_modules import in my jsconfig, but it seems no effect with your libs. ! { "compilerOptions": { "target": "ES6" }, "exclude": [ "node_modules","bower_components","temp","tmp","jspm_packages", "./js/__old/","./js/libs/" ] } thanks Link to post Share on other sites
Share Posted March 4, 2019 Sorry, I have no idea about what vscode might be doing (I've never used it) - that import code is NOT something that GSAP is forcing. I wish I had an answer for you, but I'm pretty sure this has nothing to do directly with the GSAP files. Perhaps someone else knows what might be going on? Link to post Share on other sites
Author Share Posted March 4, 2019 i was think about gsap, because i not get this issue and behavior with other libs @type intalled in my node module. all other libs here dont do this behavior ! and the import feature is manually , not automatic. Only gsap do this ! Link to post Share on other sites
Share Posted March 4, 2019 Do you know why it's doing that import automatically? Is there something in GSAP's files that you think is causing it? I've never heard anything like this before. Is this related to TypeScript definitions? Do you have them installed? I'm not very familiar with them myself, so I probably can't speak to any TypeScript-related issues, but I can assure you that there's no code in the GSAP files that's intentionally forcing vscode to add imports automatically to your project. Perhaps you should reach out to the vscode people and see what they say. 1 Link to post Share on other sites
Author Share Posted March 4, 2019 thank i will do, and not i found anything that can cause this kind of behavior in gsap, and if you say you do nothing to force this kind of feature It will maybe something in vscode and my setup ! i will try check this in deeper. Thank for your answer. Link to post Share on other sites
Share Posted March 4, 2019 Indeed this is happening since the latest VSCode update and is more likely a VSCode thing and how intellisense (not too intelligent it seems? ) is working. One solution could be to define global variables in your workspace or change the settings. Much like you I've seen this behaviour when working with VSCode, lucky me, in the project I'm working right now I'm using webstorm, so I don't have to deal with this for the next weeks , but still you could start an issue in VSCode repo or look in stack overflow. 3 1 Link to post Share on other sites
Author Share Posted March 23, 2019 solved thank. Just remove 'Unscope' the declare namespace gsap { in all d.ts files, it work fine for me. and than you will get intellisense work fine for all projet without import module Link to post Share on other sites