From a098c98b28cafbe6e01f556918f1746804d49a53 Mon Sep 17 00:00:00 2001 From: Tyler Schicke Date: Mon, 4 Feb 2019 16:51:49 -0500 Subject: scripting --- src/util/Scripting.ts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 src/util/Scripting.ts (limited to 'src/util/Scripting.ts') diff --git a/src/util/Scripting.ts b/src/util/Scripting.ts new file mode 100644 index 000000000..bf312918e --- /dev/null +++ b/src/util/Scripting.ts @@ -0,0 +1,16 @@ +import * as ts from "typescript" +import { Opt, Field } from "../fields/Field"; + +export class ExecutableScript extends Function { +} + +export function CompileScript(script: string): ExecutableScript { + let result = ts.transpileModule(script, { + compilerOptions: { + module: ts.ModuleKind.CommonJS + } + }) + console.log(result.outputText); + + return () => { }; +} \ No newline at end of file -- cgit v1.2.3-70-g09d2