Using djs types globally

I can use the djs types globally on typescript? i tried:
// tsconfig
"typeRoots": [
"node_modules/@types",
"node_modules/discord.js/typings",
],
"types": ["discord.js"],
// tsconfig
"typeRoots": [
"node_modules/@types",
"node_modules/discord.js/typings",
],
"types": ["discord.js"],
2 Replies
Unknown User
Unknown User16mo ago
Message Not Public
Sign In & Join Server To View
</Nexus_Prime>
</Nexus_Prime>16mo ago
I realized that package is too heavy to be importing in each file, so I found a way to import in a single file. Of course, importing types in typescript won't weigh more, because when compiled it won't appear, but now it's weird to import only the types, and I'm sure there's some way to use global types without needing to import When vscode imports the type, it never puts the "type" keyword so I can end up forgetting to put it and discord.js is imported confused.. so if in file A I import discord.js, and in file B I import it again, won't discord.js be loaded twice? sorry about that, i saw that information recently somewhere.. I thought about this my whole life before I saw a post about it thanks bro