From 59cc888c8bf0559c50e12fd2774ea5ac4ebb3059 Mon Sep 17 00:00:00 2001 From: yipstanley Date: Tue, 26 Feb 2019 16:33:53 -0500 Subject: basic implementation of prototype/delegate stuff --- src/fields/Document.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/fields') diff --git a/src/fields/Document.ts b/src/fields/Document.ts index 823991759..39648a950 100644 --- a/src/fields/Document.ts +++ b/src/fields/Document.ts @@ -2,7 +2,7 @@ import { Key } from "./Key" import { KeyStore } from "./KeyStore"; import { Field, Cast, FieldWaiting, FieldValue, FieldId } from "./Field" import { NumberField } from "./NumberField"; -import { ObservableMap, computed, action } from "mobx"; +import { ObservableMap, computed, action, runInAction } from "mobx"; import { TextField } from "./TextField"; import { ListField } from "./ListField"; import { Server } from "../client/Server"; @@ -210,6 +210,13 @@ export class Document extends Field { return protos; } + CreateAlias(id?: string): Document { + let alias = new Document(id) + alias.Set(KeyStore.Prototype, this) + + return alias + } + MakeDelegate(id?: string): Document { let delegate = new Document(id); -- cgit v1.2.3-70-g09d2