diff options
author | bobzel <zzzman@gmail.com> | 2024-10-04 21:35:22 -0400 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2024-10-04 21:35:22 -0400 |
commit | 9323ad30103b474e95610e97eb92916a0cf71f7b (patch) | |
tree | 72f20d339139018bde242121eaba16e9e939c93b /src/client/util/Scripting.ts | |
parent | 2e883e481fa2064983bcd16425118c1abb55cedb (diff) |
more lint fixes to schema view changes.
Diffstat (limited to 'src/client/util/Scripting.ts')
-rw-r--r-- | src/client/util/Scripting.ts | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/client/util/Scripting.ts b/src/client/util/Scripting.ts index 3ba3ff4b5..b1db0bf39 100644 --- a/src/client/util/Scripting.ts +++ b/src/client/util/Scripting.ts @@ -81,6 +81,7 @@ function Run(script: string | undefined, customParams: string[], diagnostics: ts if (!options.editable) { batch = Doc.MakeReadOnly(); } + const result = compiledFunction.apply(thisParam, params).apply(thisParam, argsArray); batch?.end(); return { success: true, result }; @@ -177,13 +178,8 @@ function forEachNode(node: ts.Node, onEnter: Traverser, onExit?: Traverser, inde ); } -// ScriptField.CompileScript(value, {}, true, undefined, DocumentIconContainer.getTransformer()); -// //addreturn = true -// //capturedvariables = undefined -// // - export function CompileScript(script: string, options: ScriptOptions = {}): CompileResult { - const captured = options.capturedVariables ?? {}; + const captured = options.capturedVariables ?? {}; const signature = Object.keys(captured).reduce((p, v) => { const formatCapture = (obj: FieldType | undefined) => `${v}=${obj instanceof RefField ? 'XXX' : obj?.toString()}`; const captureVal = captured[v]; |