Expose the TypeScript compiler for CLI usage as a subcommand: deno tsc. I think this has a clearer story than the runtime APIs which have been suggested before.
@kitsonk I've assumed this is easier than #2927. Or is it dependent on the same issues?
How would this be effectively different from deno bundle or using tsc directly? And what would be the use case?
Really just being able to compile browser code without necessitating two TypeScript compilers and npm.
It's more of a "why not" to me I guess... this kind of thing would help justify the executable size on the surface.
tsc doesn't really add any value. There is nothing unique and it would be a maintenance problem for no real value. I can certainly see value in having programmatic access to the built in TypeScript compiler though.This isn't supposed to replace #2927 to be clear, but I get what you're saying. This would be redundant alongside good programmatic access.
I guess all I want is some way on the CLI of using deno's compiler on browser code.
If #2927 was used to implement a stripped down tsc in std which was aliased as deno tsc, that would satisfy this feature request. Of course that might feel too niche depending on how much usage it sees / how sparing we want to be about std subcommands - or it'll look perfectly appropriate either way!
I guess all I want is some way on the CLI of using deno's compiler on browser code.
That doesn't make sense, because generally the Deno compiler doesn't produce code that is usable in the browser, it doesn't do any real magic, it is the stuff it doesn't do that is really different from tsc. The only thing that makes sense is to do improve deno bundle so that it can run standalone or as an ES Module, which is in flight as part of #2475 and #3283.
Okay, I think I'd overestimated the amount of tsc's functionality that's included in Deno.
Most helpful comment
Really just being able to compile browser code without necessitating two TypeScript compilers and npm.
It's more of a "why not" to me I guess... this kind of thing would help justify the executable size on the surface.