Closed dani-mp closed 1 year ago
As the error said, you have to use npm i --save-dev @types/tough-cookie
(or yarn add -D
, ... depends on your package manager) to install its declaration files.
This is not a production dependency so it won't be installed by default.
@skick1234 right, but as I'm not using that library myself, it doesn't make sense to include it in my list of dependencies. The library could do it instead. If this is not possible, maybe adding a note about it in https://github.com/distubejs/ytdl-core#installation would be good enough. But I think it's the library that should add this dependency.
I get where you're coming from, but in the TypeScript world, it's kinda like a standard thing to have those type declarations for third-party stuff. It makes your codebase cleaner and helps TypeScript do its magic.
Still, I hear you! I'll think about making 'ytdl-core' handle this dependency or, at the very least, slap a note in the docs about it. Thanks for raising it, and if you've got more thoughts or run into any other quirks, just give me a shout. I'm here to make things easier for ya!
Describe the bug
tsc --project .
fails because of the types of a third party lib.Environment