veritatisdoloremque
Version:
Monorepo for the Firebase JavaScript SDK
31 lines (21 loc) • 982 B
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [@firebase/database](./database.md) > [Query](./database.query.md) > [on](./database.query.on.md)
## Query.on() method
<b>Signature:</b>
```typescript
on(
eventType: EventType,
callback: (a: DataSnapshot, b?: string | null) => any,
cancelCallbackOrContext?: ((a: Error) => any) | object | null,
context?: object | null
): (a: DataSnapshot, b?: string | null) => any;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| eventType | [EventType](./database.eventtype.md) | |
| callback | (a: [DataSnapshot](./database.datasnapshot.md)<!-- -->, b?: string \| null) => any | |
| cancelCallbackOrContext | ((a: Error) => any) \| object \| null | |
| context | object \| null | |
<b>Returns:</b>
(a: [DataSnapshot](./database.datasnapshot.md)<!-- -->, b?: string \| null) => any