diff --git a/lib/modules/database/Reference.js b/lib/modules/database/Reference.js index 72171865..1811a23f 100644 --- a/lib/modules/database/Reference.js +++ b/lib/modules/database/Reference.js @@ -299,15 +299,15 @@ export default class Reference extends ReferenceBase { * @param onComplete * @returns {*} */ - push(value: any, onComplete?: Function): ThenableReference { + push(value: any, onComplete?: Function): Reference | Promise { if (value === null || value === undefined) { - return new ThenableReference( + return new Reference( this._database, `${this.path}/${generatePushID(this._database._serverTimeOffset)}` ); } - const newRef = new ThenableReference( + const newRef = new Reference( this._database, `${this.path}/${generatePushID(this._database._serverTimeOffset)}` ); @@ -894,10 +894,10 @@ export default class Reference extends ReferenceBase { } // eslint-disable-next-line no-unused-vars -declare class ThenableReference<+R> extends Reference { - then( - onFulfill?: (value: R) => Promise | U, - onReject?: (error: any) => Promise | U - ): Promise; - catch(onReject?: (error: any) => Promise | U): Promise; -} +// class ThenableReference<+R> extends Reference { +// then( +// onFulfill?: (value: R) => Promise | U, +// onReject?: (error: any) => Promise | U +// ): Promise; +// catch(onReject?: (error: any) => Promise | U): Promise; +// }