-
Notifications
You must be signed in to change notification settings - Fork 987
Closed
Labels
Description
[REQUIRED] Describe your environment
- Operating System version: macOS
- Browser version: N/A
- Firebase SDK version:
exp - Firebase Product: database
[REQUIRED] Describe the problem
I can't figure out how to use ServerValue.TIMESTAMP in the new RTDB SDK.
I tried this:
const { getDatabase, ServerValue } = require("firebase/database");But tsc says:
'ServerValue' only refers to a type, but is being used as a value here
Looking at the exported types, here's where it's defined:
/**
* @public
*/
export interface ServerValue {
TIMESTAMP: object;
increment(delta: number): object;
}
Seems that we need to export an object, not just an interface
Steps to reproduce:
Relevant Code:
See above.