ConstTranspiles TabScript to TypeScript or JavaScript.
The input TabScript.
An optional object containing the following optional properties:
debug When true, each consumed token is logged. If it's a function, that function will be called instead of console.debug.recover When true, the function will attempt to continue transpilation when it encounters an error in the input (or unsupported syntax), instead of throwing. Errors are logged to console.error.true, we'll transpile to JavaScript instead of TypeScript. Note that TabScript will not perform any type checking, just strip out the type info.transformImport An async function that gets an import URI, and returns the URI to be include included in the transpiled output.whitespace When "preserve" (the default), output is made to closely align with input line/column positions. When "pretty", output is formatted with human-friendly indentation and spacing.loadPlugin Function to load plugin modules from a path.An object containing:
code: The transpiled TypeScript/JavaScript code.errors: An array of errors encountered during transpilation (if any) of the form: { message: string, line: number, column: number, offset: number }. If recover is not set, this array will contain at most one error.map: An object mapping input offsets to output offsets, of the form: { in: number[], out: number[] }, where each index corresponds to a mapping pair.
Alias for the tabscript function. Transpiles TabScript code to TypeScript or JavaScript.