The source code to be processed.
Specifies the execution mode:
"transpile"
: Transpiles the code and returns the generated output."interpreter"
: Interprets the code and returns the execution result.Optional
opts: Partial<T extends "transpile" ? ITranspilerOptions : IInterpreterOptions>Optional configuration object:
"transpile"
, accepts Partial<ITranspilerOptions>
."interpreter"
, accepts Partial<IInterpreterOptions>
.Depending on the mode
parameter:
"transpile"
: Returns an object containing the transpiled code and execution time."interpreter"
: Returns an object containing the internal state and output of the interpreter.
Executes code in either "transpile" or "interpreter" mode.