Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature request: output typescript #147

Open
scarf005 opened this issue Nov 15, 2023 · 0 comments
Open

feature request: output typescript #147

scarf005 opened this issue Nov 15, 2023 · 0 comments

Comments

@scarf005
Copy link

Summary

I think it would be useful to

  • allow emit to output typescript file with its import map resolved
  • allow bundle to merge multiple typescript files into single typescript file

Use cases

Resolving import maps

{
  "imports": {
    "$std/": "https://deno.land/std@0.206.0/"
  }
}

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/std@0.206.0/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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant