aboutsummaryrefslogtreecommitdiff
path: root/src/new_fields/List.ts
diff options
context:
space:
mode:
authorTyler Schicke <tyler_schicke@brown.edu>2019-07-03 14:46:44 -0400
committerTyler Schicke <tyler_schicke@brown.edu>2019-07-03 14:46:44 -0400
commit25fdbe3b9159473a9249246f6c208b6e1220dbbb (patch)
tree8c3f4400893992e1cc45647c38c3d65adef8d891 /src/new_fields/List.ts
parent4a8d63248567443be3e1ab4678cb2d395a141c4e (diff)
Changed how scripting works
Diffstat (limited to 'src/new_fields/List.ts')
-rw-r--r--src/new_fields/List.ts5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/new_fields/List.ts b/src/new_fields/List.ts
index f1e4c4721..a2133a990 100644
--- a/src/new_fields/List.ts
+++ b/src/new_fields/List.ts
@@ -7,6 +7,7 @@ import { ObjectField } from "./ObjectField";
import { RefField } from "./RefField";
import { ProxyField } from "./Proxy";
import { Self, Update, Parent, OnUpdate, SelfProxy, ToScriptString, Copy } from "./FieldSymbols";
+import { Scripting } from "../client/util/Scripting";
const listHandlers: any = {
/// Mutator methods
@@ -294,4 +295,6 @@ class ListImpl<T extends Field> extends ObjectField {
}
}
export type List<T extends Field> = ListImpl<T> & (T | (T extends RefField ? Promise<T> : never))[];
-export const List: { new <T extends Field>(fields?: T[]): List<T> } = ListImpl as any; \ No newline at end of file
+export const List: { new <T extends Field>(fields?: T[]): List<T> } = ListImpl as any;
+
+Scripting.addGlobal("List", List); \ No newline at end of file