deno_emit
deno_emit copied to clipboard
feature request: output typescript
Summary
I think it would be useful to
- allow
emitto output typescript file with its import map resolved - allow
bundleto merge multiple typescript files into single typescript file
Use cases
Resolving import maps
{
"imports": {
"$std/": "https://deno.land/[email protected]/"
}
}
it's not possible to use import map in library as it cannot use import map. using deps.ts as a walkaround is possible but requires many manual work to manage properly. it would be very convenient to be able to transform
import "$std/collections/mod.ts"
into
import "https://deno.land/[email protected]/collections/mod.ts"
using import map, then the transpiled output could be released into registry without issues.
External Tool Limitations
bundle() strips away all type information, which makes it not possible to run tools relying on typescript AST. This could be problematic due to same reason as above (import map), and tsc cannot resolving deno's HTTP based imports.