diff options
author | yipstanley <stanley_yip@brown.edu> | 2019-02-10 22:12:04 -0500 |
---|---|---|
committer | yipstanley <stanley_yip@brown.edu> | 2019-02-10 22:12:04 -0500 |
commit | 69f0b463a78c82aaf78ceb6a5162431424452311 (patch) | |
tree | a54c7129f36d307420422b3babfa6da4d85db67e /src/fields/DocumentReference.ts | |
parent | 2e930b98726a09e597106d43a6763dd36d038771 (diff) | |
parent | 099c5823f05285fc5086c5a433658cf06dc4a04b (diff) |
Merge branch 'master' of https://github.com/browngraphicslab/Dash-Web into server_implementation
Diffstat (limited to 'src/fields/DocumentReference.ts')
-rw-r--r-- | src/fields/DocumentReference.ts | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/fields/DocumentReference.ts b/src/fields/DocumentReference.ts index 10dac9f92..983b162a3 100644 --- a/src/fields/DocumentReference.ts +++ b/src/fields/DocumentReference.ts @@ -1,4 +1,4 @@ -import { Field, Opt } from "./Field"; +import { Field, Opt, FieldValue } from "./Field"; import { Document } from "./Document"; import { Key } from "./Key"; @@ -15,12 +15,12 @@ export class DocumentReference extends Field { super(); } - Dereference(): Opt<Field> { + Dereference(): FieldValue<Field> { return this.document.Get(this.key); } - DereferenceToRoot(): Opt<Field> { - let field: Opt<Field> = this; + DereferenceToRoot(): FieldValue<Field> { + let field: FieldValue<Field> = this; while (field instanceof DocumentReference) { field = field.Dereference(); } @@ -37,5 +37,8 @@ export class DocumentReference extends Field { throw new Error("Method not implemented."); } + ToScriptString(): string { + return ""; + } }
\ No newline at end of file |