File tree Expand file tree Collapse file tree 3 files changed +18
-1
lines changed Expand file tree Collapse file tree 3 files changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -46,6 +46,7 @@ import database, {
46
46
push ,
47
47
remove ,
48
48
update ,
49
+ ServerValue ,
49
50
} from '../lib' ;
50
51
51
52
// @ts -ignore - no declaration file for DatabaseStatics
@@ -425,7 +426,7 @@ describe('Database', function () {
425
426
describe ( 'statics' , function ( ) {
426
427
it ( 'ServerValue' , function ( ) {
427
428
staticsV9Deprecation (
428
- ( ) => DatabaseStatics . ServerValue ,
429
+ ( ) => ServerValue ,
429
430
( ) => firebase . database . ServerValue ,
430
431
'ServerValue' ,
431
432
) ;
Original file line number Diff line number Diff line change @@ -220,6 +220,20 @@ export function getServerTime(db: Database): Promise<number>;
220
220
*/
221
221
export function increment ( delta : number ) : object ;
222
222
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
+
223
237
/**
224
238
* Logs debugging information to the console. Not implemented on native.
225
239
*
Original file line number Diff line number Diff line change @@ -124,6 +124,8 @@ export function increment(delta) {
124
124
return ServerValue . increment . call ( ServerValue , delta , MODULAR_DEPRECATION_ARG ) ;
125
125
}
126
126
127
+ export { ServerValue } ;
128
+
127
129
export function enableLogging ( _enabled , _persistent ) {
128
130
throw new Error ( 'enableLogging() is not implemented' ) ;
129
131
}
You can’t perform that action at this time.
0 commit comments