Skip to main content
interface Deno.EmitOptions

UNSTABLE: new API, yet to be vetted.

The options for Deno.emit() API.


bundle: "module" | "classic"

Indicate that the source code should be emitted to a single file JavaScript bundle that is a single ES module ("module") or a single file self contained script executed in an immediately invoked function when loaded ("classic").

check: boolean

If true then the sources will be typed checked, returning any diagnostic errors in the result. If false type checking will be skipped. Defaults to true.

Note by default, only TypeScript will be type checked, just like on the command line. Use the compilerOptions options of checkJs to enable type checking of JavaScript.

compilerOptions: CompilerOptions

A set of options that are aligned to TypeScript compiler options that are supported by Deno.

importMap: ImportMap

An import-map which will be applied to the imports.

importMapPath: string

An absolute path to an import-map. Required to be specified if an importMap is specified to be able to determine resolution of relative paths. If a importMap is not specified, then it will assumed the file path points to an import map on disk and will be attempted to be loaded based on current runtime permissions.

sources: Record<string, string>

A record of sources to use when doing the emit. If provided, Deno will use these sources instead of trying to resolve the modules externally.