File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -46,6 +46,7 @@ import database, {
4646 push ,
4747 remove ,
4848 update ,
49+ ServerValue ,
4950} from '../lib' ;
5051
5152// @ts -ignore - no declaration file for DatabaseStatics
@@ -425,7 +426,7 @@ describe('Database', function () {
425426 describe ( 'statics' , function ( ) {
426427 it ( 'ServerValue' , function ( ) {
427428 staticsV9Deprecation (
428- ( ) => DatabaseStatics . ServerValue ,
429+ ( ) => ServerValue ,
429430 ( ) => firebase . database . ServerValue ,
430431 'ServerValue' ,
431432 ) ;
Original file line number Diff line number Diff line change @@ -220,6 +220,20 @@ export function getServerTime(db: Database): Promise<number>;
220220 */
221221export function increment ( delta : number ) : object ;
222222
223+ /**
224+ * Server specific values.
225+ */
226+ export const ServerValue : {
227+ /**
228+ * A placeholder value for auto-populating the current timestamp.
229+ */
230+ TIMESTAMP : object ;
231+ /**
232+ * Returns a placeholder value that can be used to atomically increment the current database value.
233+ */
234+ increment ( delta : number ) : object ;
235+ } ;
236+
223237/**
224238 * Logs debugging information to the console. Not implemented on native.
225239 *
Original file line number Diff line number Diff line change @@ -124,6 +124,8 @@ export function increment(delta) {
124124 return ServerValue . increment . call ( ServerValue , delta , MODULAR_DEPRECATION_ARG ) ;
125125}
126126
127+ export { ServerValue } ;
128+
127129export function enableLogging ( _enabled , _persistent ) {
128130 throw new Error ( 'enableLogging() is not implemented' ) ;
129131}
You can’t perform that action at this time.
0 commit comments