aboutsummaryrefslogtreecommitdiff
path: root/src/client/DocServer.ts
diff options
context:
space:
mode:
authorTyler Schicke <tyler_schicke@brown.edu>2019-04-27 01:19:52 -0400
committerTyler Schicke <tyler_schicke@brown.edu>2019-04-27 01:19:52 -0400
commit513e9042ea815e964462e824d85fbd229381250f (patch)
treea9079cbd3b85aeb09b0b0ade763422f6fd405e7c /src/client/DocServer.ts
parentfca16fb81f470b43c72c1e24e530fdf66430dc7a (diff)
A bunch more stuff
Diffstat (limited to 'src/client/DocServer.ts')
-rw-r--r--src/client/DocServer.ts6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/client/DocServer.ts b/src/client/DocServer.ts
index 02fd28a86..3f17baec6 100644
--- a/src/client/DocServer.ts
+++ b/src/client/DocServer.ts
@@ -1,5 +1,5 @@
import * as OpenSocket from 'socket.io-client';
-import { MessageStore, Types } from "./../server/Message";
+import { MessageStore, Types, Message } from "./../server/Message";
import { Opt, FieldWaiting, RefField, HandleUpdate } from '../new_fields/Doc';
import { Utils } from '../Utils';
import { SerializationHelper } from './util/SerializationHelper';
@@ -13,6 +13,10 @@ export namespace DocServer {
return window.location.origin + extension;
}
+ export function DeleteDatabase() {
+ Utils.Emit(_socket, MessageStore.DeleteAll, {});
+ }
+
export async function GetRefField(id: string): Promise<Opt<RefField>> {
let cached = _cache[id];
if (cached === undefined) {