aboutsummaryrefslogtreecommitdiff
path: root/src/new_fields/Doc.ts
diff options
context:
space:
mode:
authorTyler Schicke <tyler_schicke@brown.edu>2019-05-19 02:18:50 -0400
committerTyler Schicke <tyler_schicke@brown.edu>2019-05-19 02:18:50 -0400
commit4667498586c19f7fff1e411f5842e8ae6903b39a (patch)
treef7361ee28ebbb76690c8dd1cf0b0c3dbcc6040c6 /src/new_fields/Doc.ts
parent3f12e4a4b776010e09d12a1adfb1d243675bcd6e (diff)
Added readonly mode and fixed being able to set id of new workspace
Diffstat (limited to 'src/new_fields/Doc.ts')
-rw-r--r--src/new_fields/Doc.ts8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/new_fields/Doc.ts b/src/new_fields/Doc.ts
index c6fa31a99..02dd34cb4 100644
--- a/src/new_fields/Doc.ts
+++ b/src/new_fields/Doc.ts
@@ -218,13 +218,13 @@ export namespace Doc {
return copy;
}
- export function MakeDelegate(doc: Doc): Doc;
- export function MakeDelegate(doc: Opt<Doc>): Opt<Doc>;
- export function MakeDelegate(doc: Opt<Doc>): Opt<Doc> {
+ export function MakeDelegate(doc: Doc, id?: string): Doc;
+ export function MakeDelegate(doc: Opt<Doc>, id?: string): Opt<Doc>;
+ export function MakeDelegate(doc: Opt<Doc>, id?: string): Opt<Doc> {
if (!doc) {
return undefined;
}
- const delegate = new Doc();
+ const delegate = new Doc(id, true);
delegate.proto = doc;
return delegate;
}