Bundle ts code to ts using deno emit
When bundling code using https://deno.land/x/emit@0.38.2 it bundles into javascript but i want it to be typescript. is it possible to do this?
1 Reply
I wasn't able to find the answer to your question in the official Deno documentation. The
deno emit
command is typically used to compile TypeScript code into JavaScript, and the bundling functionality provided by Deno is designed to output JavaScript code that can be run in Deno or a web browser.
However, based on your message, it seems like you are looking to bundle TypeScript code into a single TypeScript file. This is not a common operation, as TypeScript is usually transpiled to JavaScript for execution. The Deno toolchain is designed to work with JavaScript as the output format for bundled code.
Please note that this advice is not based on the Deno documentation, and I would advise you to double-check the accuracy of this advice. If you need TypeScript code to remain in TypeScript after bundling for the purpose of type checking or other reasons, you might need to look into other tools or write a custom script to concatenate the TypeScript files while preserving the type annotations.