3 ms·
You 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 np
by flohofwoe 2y ago
You 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]