dts-bundle-generator icon indicating copy to clipboard operation
dts-bundle-generator copied to clipboard

Generate declaration map

Open donmahallem opened this issue 4 years ago • 4 comments

What do you think about providing an option to output sourcemaps for the bundled typings?

donmahallem avatar Dec 10 '21 02:12 donmahallem

Even though I cannot imagine use case for that (maybe you can provide?) I don't mind to have such option.

timocov avatar Dec 12 '21 20:12 timocov

At the moment I see at least 1 problem that might blocks the implementation here - the process how the library achieves the bundling. It compiles the code to .d.ts first and then works with that d.ts. files only (no information about the original sources files at that point). So it needs to be provided somehow the original place of any statement so we can refer to them. Not sure if the compiler provides this API though.

timocov avatar Aug 13 '22 10:08 timocov

If the compiler doesn't provide the API, you can always just invoke tsc and copy it from the generated output.

Zamiell avatar Aug 13 '22 16:08 Zamiell