Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/deno/cli/js/compiler_api.ts

A modern runtime for JavaScript and TypeScript.
Go to Latest
import * as deno from "https://deno.land/x/deno@v0.30.0/cli/js/compiler_api.ts";

Functions

Takes a root module name, and optionally a record set of sources. Resolves with a single JavaScript string that is like the output of a deno bundle command. If just a root name is provided, the modules will be resolved as if the root module had been passed on the command line.

Takes a root module name, any optionally a record set of sources. Resolves with a compiled set of modules. If just a root name is provided, the modules will be resolved as if the root module had been passed on the command line.

Takes a set of TypeScript sources and resolves with a map where the key was the original file name provided in sources and the result contains the source and optionally the map from the transpile operation. This does no type checking and validation, it effectively "strips" the types from the file.

Interfaces

A specific subset TypeScript compiler options that can be supported by the Deno TypeScript compiler.

The results of a transpile only command, where the source contains the emitted source, and map optionally contains the source map.