Skip to content
This repository was archived by the owner on Apr 4, 2023. It is now read-only.

Commit 646b338

Browse files
committed
Add timestamp for webapi
1 parent 12b5a2a commit 646b338

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

src/app/index.ts

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -52,14 +52,6 @@ export function firestore(app?: any): firebaseFirestoreModule.Firestore {
5252

5353
let functionsCache;
5454

55-
export namespace database {
56-
// This is just to follow the webs interface. On android and ios enable logging only accepts a boolean
57-
// By default logging is set to Info. We will set to debug if true and none if false.
58-
export function enableLogging(logger?: boolean | ((a: string) => any), persistent?: boolean): any {
59-
firebase.enableLogging(logger, persistent);
60-
}
61-
}
62-
6355
export function functions(app?: any): firebaseFunctionsModule.Functions {
6456
if (app) {
6557
console.log("The 'app' param is ignored at the moment.");
@@ -81,3 +73,13 @@ export function storage(app?: any): firebaseStorageModule.Storage {
8173
}
8274
return storageCache;
8375
}
76+
export namespace database {
77+
// This is just to follow the webs interface. On android and ios enable logging only accepts a boolean
78+
// By default logging is set to Info. We will set to debug if true and none if false.
79+
export function enableLogging(logger?: boolean | ((a: string) => any), persistent?: boolean): any {
80+
firebase.enableLogging(logger, persistent);
81+
}
82+
}
83+
export namespace database.ServerValue {
84+
export let TIMESTAMP: Object = { ".sv": "timestamp" };
85+
}

0 commit comments

Comments
 (0)