3 ms·
It would be nice for debugging if at least simple npms could just bundle their .ts files without any processing, so we could see the comments and types as they
by skybrian 2y ago
It would be nice for debugging if at least simple npms could just bundle their .ts files without any processing, so we could see the comments and types as they existed in the git repo. Apps can always minify them later.
(I use Deno, but also use some npms.)
- flohofwoe 2y agoYou can simply create npm packages which contain only the 'unprocessed' TS source files (or really any type of files - for instance I experimented with using npm as package for C/C++ projects in the past, it works just fine). Pre-bundling or compiling from TS to JS is just a convention. And in case of bundling not a good one IMHO, because bundling should only be a final step in the top-level project. One good reason to compile the package content to .js/.d.js/.map files is that the resulting package is usable both in JS and TS projects.
- skybrian 2y agoThe nice thing about this change to Node.js (when it’s no longer experimental) is that you could just distribute .ts files and JS projects could use them.
- deleted 2y ago[deleted]