Skip to main content
interface Deno.EmitOptions

UNSTABLE: new API, yet to be vetted.

The options for Deno.emit() API.

Properties

optional
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").

optional
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.

optional
compilerOptions: CompilerOptions

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

optional
importMap: ImportMap

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

optional
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.

optional
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.