From 5939e5b1df11a21c1fed2aa84ba9726affa7e28a Mon Sep 17 00:00:00 2001
From: bobzel <zzzman@gmail.com>
Date: Thu, 10 Mar 2022 11:18:21 -0500
Subject: compile fixes

---
 src/client/views/ScriptingRepl.tsx | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

(limited to 'src/client/views/ScriptingRepl.tsx')

diff --git a/src/client/views/ScriptingRepl.tsx b/src/client/views/ScriptingRepl.tsx
index c598b2861..4ed6da24a 100644
--- a/src/client/views/ScriptingRepl.tsx
+++ b/src/client/views/ScriptingRepl.tsx
@@ -3,7 +3,8 @@ import { action, observable } from 'mobx';
 import { observer } from 'mobx-react';
 import * as React from 'react';
 import { DocumentManager } from '../util/DocumentManager';
-import { CompileScript, Scripting, Transformer, ts } from '../util/Scripting';
+import { CompileScript, Transformer, ts } from '../util/Scripting';
+import { ScriptingGlobals } from '../util/ScriptingGlobals';
 import { DocumentIconContainer } from './nodes/DocumentIcon';
 import { OverlayView } from './OverlayView';
 import './ScriptingRepl.scss';
@@ -81,7 +82,7 @@ export class ScriptingRepl extends React.Component {
             transformer: context => {
                 const knownVars: { [name: string]: number } = {};
                 const usedDocuments: number[] = [];
-                Scripting.getGlobals().forEach(global => knownVars[global] = 1);
+                ScriptingGlobals.getGlobals().forEach((global: any) => knownVars[global] = 1);
                 return root => {
                     function visit(node: ts.Node) {
                         let skip = false;
@@ -124,7 +125,7 @@ export class ScriptingRepl extends React.Component {
             case "Enter": {
                 const docGlobals: { [name: string]: any } = {};
                 DocumentManager.Instance.DocumentViews.forEach((dv, i) => docGlobals[`d${i}`] = dv.props.Document);
-                const globals = Scripting.makeMutableGlobalsCopy(docGlobals);
+                const globals = ScriptingGlobals.makeMutableGlobalsCopy(docGlobals);
                 const script = CompileScript(this.commandString, { typecheck: false, addReturn: true, editable: true, params: { args: "any" }, transformer: this.getTransformer(), globals });
                 if (!script.compiled) {
                     this.commands.push({ command: this.commandString, result: script.errors });
-- 
cgit v1.2.3-70-g09d2

