Skip to main content
Module

x/emit/mod.ts>transpile

Transpile and bundle JavaScript and TypeScript under Deno and Deno Deploy
Go to Latest
function transpile
import { transpile } from "https://deno.land/x/emit@0.24.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: TranspileOptions = [UNSUPPORTED]

Options to use when emitting.

Returns

Promise<Map<string, string>>

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