-
Notifications
You must be signed in to change notification settings - Fork 955
Closed
Labels
Description
[REQUIRED] Describe your environment
- Operating System version: macOS
- Browser version: N/A
- Firebase SDK version: firebase-admin@10
- Firebase Product: database
[REQUIRED] Describe the problem
The transaction
method on a reference is typed to return Promise<any>
as opposed to Promise<{ committed: boolean, snapshot: DataSnapshot }>
.
firebase-js-sdk/packages/database-types/index.d.ts
Lines 140 to 144 in a7f4a2e
transaction( | |
transactionUpdate: (a: any) => any, | |
onComplete?: (a: Error | null, b: boolean, c: DataSnapshot | null) => any, | |
applyLocally?: boolean | |
): Promise<any>; |
This is the same problem in the docs.
I'm happy to create a PR to update the above file, but not sure if that's the correct place to do this?
Steps to reproduce:
const { getDatabase } = require('firebase-admin/database')
const result = await getDatabase().ref('blah').transaction(data => data)
Result is any
Relevant Code:
See above.