diff options
author | usodhi <61431818+usodhi@users.noreply.github.com> | 2020-05-15 22:41:58 +0530 |
---|---|---|
committer | usodhi <61431818+usodhi@users.noreply.github.com> | 2020-05-15 22:41:58 +0530 |
commit | 0cc83ef72b6b1b254d97bf07a97dd1fe936aa25a (patch) | |
tree | bce434d8545a953fd943743f0714609f23529220 /src/fields/ObjectField.ts | |
parent | 9c0b8ab5820232292e02fbf453e50261137a533c (diff) | |
parent | 98c7540fff67c232c1b04f2130ee624f9a70afbd (diff) |
resolved conflicts
Diffstat (limited to 'src/fields/ObjectField.ts')
-rw-r--r-- | src/fields/ObjectField.ts | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/fields/ObjectField.ts b/src/fields/ObjectField.ts new file mode 100644 index 000000000..9aa1c9b04 --- /dev/null +++ b/src/fields/ObjectField.ts @@ -0,0 +1,20 @@ +import { RefField } from "./RefField"; +import { OnUpdate, Parent, Copy, ToScriptString, ToString } from "./FieldSymbols"; +import { Scripting } from "../client/util/Scripting"; + +export abstract class ObjectField { + protected [OnUpdate](diff?: any) { } + private [Parent]?: RefField | ObjectField; + abstract [Copy](): ObjectField; + + abstract [ToScriptString](): string; + abstract [ToString](): string; +} + +export namespace ObjectField { + export function MakeCopy<T extends ObjectField>(field: T) { + return field?.[Copy](); + } +} + +Scripting.addGlobal(ObjectField);
\ No newline at end of file |