Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

TypeScript WebStorm library sources

I am totally new to TS. Using WebStorm because I am used to JetBrains tooling. From other languages I am used to a workflow where I have some kind of dependency management like maven there is option to download sources downloads me the library source and when I do some debugging or examining of the library I can dig/explore directly in original source code.

Is there something similar possible in TS or is it impossible by design of npm or ts? When I download lib like nestjs I get only typing files and compiles js files. Is there npm option I missed out to also download TypeScript sources and where debugger can work with it?

like image 261
svobol13 Avatar asked Mar 15 '26 16:03

svobol13


1 Answers

There is nothing like that. Initially, when node.js and npm appeared, no one was using compilers/transpilers like TypeScript or Babel, everything was just plain javascript. Whatever was published on npm was the source.

Over the years, this has changed, but there is still no designated way to publish sources alongside with the code. The only thing that npm has is optional repository field in package.json, which may contain URL of repository where source code lives. For popular packages, this typically points to github where you can browse the source or clone it.

like image 81
artem Avatar answered Mar 17 '26 10:03

artem



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!