Skip to content

Commit

Permalink
fix(database, types): harmonize database.on() w/firebase-js-sdk
Browse files Browse the repository at this point in the history
This builds on the work both upstream and in this repo of @SCasarotto
from #4550
  • Loading branch information
mikehardy committed Apr 9, 2021
1 parent d2838ff commit 6aea33f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/database/lib/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -658,11 +658,11 @@ export namespace FirebaseDatabaseTypes {
*
*/
on(
eventType?: EventType,
callback?: (data: DataSnapshot, previousChildKey?: string) => void,
eventType: EventType,
callback: (data: DataSnapshot, previousChildKey?: string | null) => void,
cancelCallbackOrContext?: ((a: Error) => void) | Record<string, any> | null,
context?: Record<string, any> | null,
): (a: DataSnapshot, b?: string | null) => void;
): (a: DataSnapshot | null, b?: string | null) => void;

/**
* Listens for exactly one event of the specified event type, and then stops listening.
Expand Down

1 comment on commit 6aea33f

@vercel
Copy link

@vercel vercel bot commented on 6aea33f Apr 9, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.