diff options
author | Tyler Schicke <tyler_schicke@brown.edu> | 2019-02-04 16:51:49 -0500 |
---|---|---|
committer | Tyler Schicke <tyler_schicke@brown.edu> | 2019-02-04 16:51:49 -0500 |
commit | a098c98b28cafbe6e01f556918f1746804d49a53 (patch) | |
tree | 7985dda8bcc390db15b621dc8ead3617f9968678 | |
parent | e79e53d78546501fc855b76a84f000289ed7433a (diff) |
scripting
-rw-r--r-- | src/util/Scripting.ts | 16 |
1 files changed, 16 insertions, 0 deletions
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 |