Generate declaration map
What do you think about providing an option to output sourcemaps for the bundled typings?
Even though I cannot imagine use case for that (maybe you can provide?) I don't mind to have such option.
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.
If the compiler doesn't provide the API, you can always just invoke tsc and copy it from the generated output.