Skip to content

Commit

Permalink
Fixes #1450: ThenableReference should extend Promise, not PromiseLike. (
Browse files Browse the repository at this point in the history
#1462)

Since we implement .catch(), we should extend Promise.
  • Loading branch information
mikelehen authored Jan 9, 2019
1 parent 1e7771c commit 0b42ff8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/database-types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ export interface ServerValue {
};
}

export interface ThenableReference extends Reference, PromiseLike<Reference> {}
export interface ThenableReference extends Reference, Promise<Reference> {}

export function enableLogging(
logger?: boolean | ((a: string) => any),
Expand Down
2 changes: 1 addition & 1 deletion packages/firebase/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -585,7 +585,7 @@ declare namespace firebase.database {

interface ThenableReference
extends firebase.database.Reference,
PromiseLike<any> {}
Promise<Reference> {}

function enableLogging(
logger?: boolean | ((a: string) => any),
Expand Down

0 comments on commit 0b42ff8

Please sign in to comment.