summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNick Van Doorn <vandoorn.nick@gmail.com>2019-01-20 13:38:19 -0800
committerNick Van Doorn <vandoorn.nick@gmail.com>2019-01-20 13:38:19 -0800
commitd0432b516ef027949312b6e41b3b4254ffae89bd (patch)
tree5658217750174655c4b5b382274292647bfc302a /src
parent2115c6d5e62a4ccd89826e4781dd7e0ed98548d3 (diff)
Add subscribe method to DatabaseInterface
Diffstat (limited to 'src')
-rw-r--r--src/database.model.ts5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/database.model.ts b/src/database.model.ts
index dc39fda..a0cd3a5 100644
--- a/src/database.model.ts
+++ b/src/database.model.ts
@@ -19,6 +19,11 @@ export interface DatabaseInterface {
read(path: string): Promise<Object>;
/**
+ * Subscribe to all data changes at path
+ */
+ subscribe(path: string, callback: (e: any) => any): () => any;
+
+ /**
* Write data to the node described by path
* where path once again uses "/" separate nodes
*