ThenableReference interface
Stay organized with collections
Save and categorize content based on your preferences.
A Promise
that can also act as a DatabaseReference
when returned by push(). The reference is available immediately and the Promise
resolves as the write to the backend completes.
Signature:
export declare interface ThenableReference extends DatabaseReference, Pick<Promise<DatabaseReference>, 'then' | 'catch'>
Extends: DatabaseReference, Pick<Promise<DatabaseReference>, 'then' | 'catch'>
Properties
ThenableReference.key
Signature:
key: string;
ThenableReference.parent
Signature:
parent: DatabaseReference;
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-03-24 UTC.
[null,null,["Last updated 2025-03-24 UTC."],[],[],null,["# ThenableReference interface\n\nA `Promise` that can also act as a `DatabaseReference` when returned by [push()](./database.md#push_c74661c). The reference is available immediately and the `Promise` resolves as the write to the backend completes.\n\n**Signature:** \n\n export declare interface ThenableReference extends DatabaseReference, Pick\u003cPromise\u003cDatabaseReference\u003e, 'then' | 'catch'\u003e \n\n**Extends:** [DatabaseReference](./database.databasereference.md#databasereference_interface), Pick\\\u003cPromise\\\u003c[DatabaseReference](./database.databasereference.md#databasereference_interface)\\\u003e, 'then' \\| 'catch'\\\u003e\n\nProperties\n----------\n\n| Property | Type | Description |\n|-------------------------------------------------------------------|----------------------------------------------------------------------------------|-------------|\n| [key](./database.thenablereference.md#thenablereferencekey) | string | |\n| [parent](./database.thenablereference.md#thenablereferenceparent) | [DatabaseReference](./database.databasereference.md#databasereference_interface) | |\n\nThenableReference.key\n---------------------\n\n**Signature:** \n\n key: string;\n\nThenableReference.parent\n------------------------\n\n**Signature:** \n\n parent: DatabaseReference;"]]