aboutsummaryrefslogtreecommitdiff
path: root/src/client/util/Scripting.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/util/Scripting.ts')
-rw-r--r--src/client/util/Scripting.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/client/util/Scripting.ts b/src/client/util/Scripting.ts
index f0a5f9ed9..dbb994dbd 100644
--- a/src/client/util/Scripting.ts
+++ b/src/client/util/Scripting.ts
@@ -160,7 +160,7 @@ class ScriptingCompilerHost {
export type Traverser = (node: ts.Node, indentation: string) => boolean | void;
export type TraverserParam = Traverser | { onEnter: Traverser; onLeave: Traverser };
export type Transformer = {
- transformer: ts.TransformerFactory<ts.SourceFile>;
+ transformer: ts.TransformerFactory<ts.Node>;
getVars?: () => { [name: string]: Field };
};
export interface ScriptOptions {
@@ -220,7 +220,7 @@ export function CompileScript(script: string, options: ScriptOptions = {}): Comp
const printer = ts.createPrinter({
newLine: ts.NewLineKind.LineFeed,
});
- script = printer.printFile(transformed[0]);
+ script = printer.printFile(transformed[0].getSourceFile());
}
result.dispose();
}