Closed
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
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')constresult=awaitgetDatabase().ref('blah').transaction(data=>data)
Result is any
Relevant Code:
See above.