veritatisdoloremque
Version:
Monorepo for the Firebase JavaScript SDK
31 lines (21 loc) • 967 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) > [once](./database.query.once.md)
## Query.once() method
<b>Signature:</b>
```typescript
once(
eventType: EventType,
successCallback?: (a: DataSnapshot, b?: string | null) => any,
failureCallbackOrContext?: ((a: Error) => void) | object | null,
context?: object | null
): Promise<DataSnapshot>;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| eventType | [EventType](./database.eventtype.md) | |
| successCallback | (a: [DataSnapshot](./database.datasnapshot.md)<!-- -->, b?: string \| null) => any | |
| failureCallbackOrContext | ((a: Error) => void) \| object \| null | |
| context | object \| null | |
<b>Returns:</b>
Promise<[DataSnapshot](./database.datasnapshot.md)<!-- -->>