Skip to main content
Module

x/ts_transpiler/mod.ts>CompilerOptions

A standalone typescript transpiler based on deno, running in the browser
Latest
interface CompilerOptions
import { type CompilerOptions } from "https://deno.land/x/ts_transpiler@v0.0.2/mod.ts";

Copyright (c) 2018-2023 the Deno authors https://github.com/denoland/deno_emit/

Properties

optional
emitDecoratorMetadata: boolean

Determines if reflection meta data is emitted for legacy decorators or not. Defaults to false.

optional
importsNotUsedAsValues: string

What to do with import statements that only import types i.e. whether to remove them (Remove), keep them as side-effect imports (Preserve) or error (Error). Defaults to Remove.

optional
inlineSourceMap: boolean

When set, the source map will be embedded the source map content in the .js files.

optional
inlineSources: boolean

When set, the original content of the .ts file as an embedded string in the source map (using the source map’s sourcesContent property).

This is often useful in the same cases as inlineSourceMap.

optional
jsx:
| "preserve"
| "react-jsx"
| "react-jsxdev"
| "react-native"
| "react"

Controls how JSX constructs are emitted in JavaScript files. This only affects output of JS files that started in .jsx or .tsx files.

optional
jsxFactory: string

Changes the function called in .js files when compiling JSX Elements using the classic JSX runtime. The most common change is to use "h" or "preact.h".

optional
jsxFragmentFactory: string

Specify the JSX fragment factory function to use when targeting react JSX emit with jsxFactory compiler option is specified, e.g. Fragment.

optional
jsxImportSource: string

The string module specifier to implicitly import JSX factories from when transpiling JSX.