Is it possible to ask NPM to download the TypeScript source files for dependencies, instead of just the *.d.ts and compiled *.js files?
I'm using VS Code's Go To Definition feature, but for dependencies it just takes me to .d.ts files that lack implementation logic - this makes it harder to understand what my dependencies are doing.
Thanks!
Downloading TypeScript source files via NPM is only possible if those files have been published to NPM. The general convention for TypeScript projects is to only publish the dist/ directory which is generated post-compilation, with .d.ts files included to aid development that uses the library. If this is the case, then the only (inconvenient) way to view the source TypeScript files is to find out if/where the source code is hosted.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With