Skip to content

Commit b79bd33

Browse files
authored
export types from @firebase/database-compat for admin SDK (#5531)
* export types for admin SDK * Create violet-goats-turn.md * add app-compat to devDeps
1 parent 5823d0b commit b79bd33

File tree

3 files changed

+13
-0
lines changed

3 files changed

+13
-0
lines changed

.changeset/violet-goats-turn.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@firebase/database-compat": patch
3+
---
4+
5+
export types from @firebase/database-compat for admin SDK

packages/database-compat/package.json

+3
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,8 @@
3333
"@firebase/util": "1.3.0",
3434
"@firebase/component": "0.5.6",
3535
"tslib": "^2.1.0"
36+
},
37+
"devDependencies": {
38+
"@firebase/app-compat": "0.1.1"
3639
}
3740
}

packages/database-compat/src/index.ts

+5
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,11 @@ export function registerDatabase(instance: FirebaseNamespace) {
6767

6868
registerDatabase(firebase);
6969

70+
// Types to export for the admin SDK. They are exported in the browser entry point only for typings
71+
// The same symbol should be exported from the node entry point so their values can be accessed at runtime by admin SDK
72+
export type { Database, Query, Reference, enableLogging, ServerValue, DataSnapshot };
73+
export type { OnDisconnect } from '@firebase/database';
74+
7075
declare module '@firebase/app-compat' {
7176
interface FirebaseNamespace {
7277
database?: {

0 commit comments

Comments
 (0)