Skip to main content
Module

x/emit/mod.ts>emit

Transpile and bundle JavaScript and TypeScript under Deno and Deno Deploy
Go to Latest
function emit
import { emit } from "https://deno.land/x/emit@0.14.0/mod.ts";

Transpile TypeScript (or JavaScript) into JavaScript, returning a promise which resolves with a map of the emitted files.

Parameters

root: string | URL

The root module specifier to use for the bundle.

optional
options: EmitOptions = [UNSUPPORTED]

Options to use when emitting.

Returns

Promise<Record<string, string>>

A promise which resolves with an object map of the emitted files, where the key is the emitted files name and the value is the source for the file.