Updated firebase query method .once to optionally return a promise

This commit is contained in:
Cameron
2016-03-10 21:20:12 +00:00
parent 0144ad5a74
commit 8d7a58e59c
2 changed files with 9 additions and 1 deletions
+1
View File
@@ -109,6 +109,7 @@ interface FirebaseQuery {
*/
once(eventType: string, successCallback: (dataSnapshot: FirebaseDataSnapshot) => void, context?: Object): void;
once(eventType: string, successCallback: (dataSnapshot: FirebaseDataSnapshot) => void, failureCallback?: (error: any) => void, context?: Object): void;
once(eventType: string): Promise<FirebaseDataSnapshot>
/**
* Generates a new Query object ordered by the specified child key.
*/