typescript: Transpile TypeScript code to JavaScript
Description
This function uses the TypeScript compiler to transpile TypeScript code into JavaScript. Note that the
first time this function is called, it will load the TypeScript library into the JavaScript context,
which may take a few seconds. Subsequent calls will be faster.
Usage
typescript(input, options = NULL)
Value
A list containing the transpiled JavaScript code and any diagnostics.
Arguments
input
Either a path to a file or a character string containing the TypeScript code to be transpiled.
options
A list of options to pass to the TypeScript transpiler. See the
TypeScript documentation for available options.