diff options
author | Nick Van Doorn <vandoorn.nick@gmail.com> | 2019-01-20 13:38:19 -0800 |
---|---|---|
committer | Nick Van Doorn <vandoorn.nick@gmail.com> | 2019-01-20 13:38:19 -0800 |
commit | d0432b516ef027949312b6e41b3b4254ffae89bd (patch) | |
tree | 5658217750174655c4b5b382274292647bfc302a /src | |
parent | 2115c6d5e62a4ccd89826e4781dd7e0ed98548d3 (diff) |
Add subscribe method to DatabaseInterface
Diffstat (limited to 'src')
-rw-r--r-- | src/database.model.ts | 5 |
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 * |