Skip to content

Commit 6a10d6b

Browse files
committed
make thenable only implement then & catch
1 parent 36050f9 commit 6a10d6b

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

packages/database-types/index.d.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,9 @@ export interface ServerValue {
134134
increment(delta: number): Object;
135135
}
136136

137-
export interface ThenableReference extends Reference, Promise<Reference> {}
137+
export interface ThenableReference
138+
extends Reference,
139+
Pick<Promise<Reference>, 'then' | 'catch'> {}
138140

139141
export function enableLogging(
140142
logger?: boolean | ((a: string) => any),

packages/firebase/index.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -6902,7 +6902,7 @@ declare namespace firebase.database {
69026902

69036903
interface ThenableReference
69046904
extends firebase.database.Reference,
6905-
Promise<Reference> {}
6905+
Pick<Promise<Reference>, 'then' | 'catch'> {}
69066906

69076907
/**
69086908
* Logs debugging information to the console.

0 commit comments

Comments
 (0)