diff options
author | tschicke-brown <tyler_schicke@brown.edu> | 2019-02-22 12:36:11 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-22 12:36:11 -0500 |
commit | 85d7a3d9aee44f0b199dddace92f7a683bc33eb6 (patch) | |
tree | 1128cba0e4532e1ca9ad5eba8c85cec1c74c2c5a /src/fields/Document.ts | |
parent | 3f9e4363e6601eac175ff71192d414fd6051d921 (diff) | |
parent | f58c27d102ffbe44eea09ff6e3900292d273a021 (diff) |
Merge pull request #9 from browngraphicslab/collectionView
Added CollectionView
Diffstat (limited to 'src/fields/Document.ts')
-rw-r--r-- | src/fields/Document.ts | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/fields/Document.ts b/src/fields/Document.ts index 6667485b6..ff13732b3 100644 --- a/src/fields/Document.ts +++ b/src/fields/Document.ts @@ -90,6 +90,15 @@ export class Document extends Field { return field; } + GetAsync(key: Key, callback: (field: Field) => void): boolean { + //This currently doesn't deal with prototypes + if (this._proxies.has(key.Id)) { + Server.GetDocumentField(this, key, callback); + return true; + } + return false; + } + GetT<T extends Field = Field>(key: Key, ctor: { new(...args: any[]): T }, ignoreProto: boolean = false): FieldValue<T> { var getfield = this.Get(key, ignoreProto); if (getfield != FieldWaiting) { |