I use got in a typescript library I created, compile it using tsc into a dist folder with declaration files.
I then install this library (using npm I github:user/etc).
I try to tsc my main api which includes my library and it fails:
error TS2688: Cannot find type definition file for 'node_modules/got/dist/source/core/timed-out.js'.
///
I get 2 of these errors, one from my index.d.ts and the other from a nested d.ts file inside my library, both trying to reference "node_modules" as above. If I modify the path to point to my main projects node_modules the error goes away, but that path is different for index.d.ts vs nested file. Also, if I manually delete the line altogether, my API works as expected.
I only ever import got from 'got'
Why is this Triple Slash Directive being generated in the first place?
Perhaps I am missing something in my libs tsconfig.json, but I've tried many variations.
Thank you!
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too