@@ -29,53 +29,37 @@ declare namespace firebase {
29
29
next ( value : V | null ) : any ;
30
30
}
31
31
32
- class Promise < T > extends Promise_Instance < T > {
33
- static all ( values : firebase . Promise < any > [ ] ) : firebase . Promise < any [ ] > ;
34
- static reject ( error : Error ) : firebase . Promise < any > ;
35
- static resolve < T > ( value ? : T ) : firebase . Promise < T > ;
36
- }
37
- class Promise_Instance < T > implements firebase . Thenable < any > {
38
- constructor ( resolver : ( a : ( a : T ) => void , b : ( a : Error ) => void ) => any ) ;
39
- catch ( onReject ? : ( a : Error ) => any ) : firebase . Thenable < any > ;
40
- then ( onResolve ? : ( a : T ) => any , onReject ? : ( a : Error ) => any ) : firebase . Promise < any > ;
41
- }
42
-
43
32
var SDK_VERSION : string ;
44
33
45
- interface Thenable < T > {
46
- catch ( onReject ? : ( a : Error ) => any ) : any ;
47
- then ( onResolve ? : ( a : T ) => any , onReject ? : ( a : Error ) => any ) : firebase . Thenable < any > ;
48
- }
49
-
50
34
type Unsubscribe = ( ) => void ;
51
35
52
36
interface User extends firebase . UserInfo {
53
- delete ( ) : firebase . Promise < any > ;
37
+ delete ( ) : Promise < any > ;
54
38
emailVerified : boolean ;
55
- getIdToken ( forceRefresh ? : boolean ) : firebase . Promise < any > ;
56
- getToken ( forceRefresh ? : boolean ) : firebase . Promise < any > ;
39
+ getIdToken ( forceRefresh ? : boolean ) : Promise < any > ;
40
+ getToken ( forceRefresh ? : boolean ) : Promise < any > ;
57
41
isAnonymous : boolean ;
58
- linkAndRetrieveDataWithCredential ( credential : firebase . auth . AuthCredential ) : firebase . Promise < any > ;
59
- linkWithCredential ( credential : firebase . auth . AuthCredential ) : firebase . Promise < any > ;
60
- linkWithPhoneNumber ( phoneNumber : string , applicationVerifier : firebase . auth . ApplicationVerifier ) : firebase . Promise < any > ;
61
- linkWithPopup ( provider : firebase . auth . AuthProvider ) : firebase . Promise < any > ;
62
- linkWithRedirect ( provider : firebase . auth . AuthProvider ) : firebase . Promise < any > ;
42
+ linkAndRetrieveDataWithCredential ( credential : firebase . auth . AuthCredential ) : Promise < any > ;
43
+ linkWithCredential ( credential : firebase . auth . AuthCredential ) : Promise < any > ;
44
+ linkWithPhoneNumber ( phoneNumber : string , applicationVerifier : firebase . auth . ApplicationVerifier ) : Promise < any > ;
45
+ linkWithPopup ( provider : firebase . auth . AuthProvider ) : Promise < any > ;
46
+ linkWithRedirect ( provider : firebase . auth . AuthProvider ) : Promise < any > ;
63
47
phoneNumber : string | null ;
64
48
providerData : ( firebase . UserInfo | null ) [ ] ;
65
- reauthenticateAndRetrieveDataWithCredential ( credential : firebase . auth . AuthCredential ) : firebase . Promise < any > ;
66
- reauthenticateWithCredential ( credential : firebase . auth . AuthCredential ) : firebase . Promise < any > ;
67
- reauthenticateWithPhoneNumber ( phoneNumber : string , applicationVerifier : firebase . auth . ApplicationVerifier ) : firebase . Promise < any > ;
68
- reauthenticateWithPopup ( provider : firebase . auth . AuthProvider ) : firebase . Promise < any > ;
69
- reauthenticateWithRedirect ( provider : firebase . auth . AuthProvider ) : firebase . Promise < any > ;
49
+ reauthenticateAndRetrieveDataWithCredential ( credential : firebase . auth . AuthCredential ) : Promise < any > ;
50
+ reauthenticateWithCredential ( credential : firebase . auth . AuthCredential ) : Promise < any > ;
51
+ reauthenticateWithPhoneNumber ( phoneNumber : string , applicationVerifier : firebase . auth . ApplicationVerifier ) : Promise < any > ;
52
+ reauthenticateWithPopup ( provider : firebase . auth . AuthProvider ) : Promise < any > ;
53
+ reauthenticateWithRedirect ( provider : firebase . auth . AuthProvider ) : Promise < any > ;
70
54
refreshToken : string ;
71
- reload ( ) : firebase . Promise < any > ;
72
- sendEmailVerification ( actionCodeSettings ? : firebase . auth . ActionCodeSettings | null ) : firebase . Promise < any > ;
55
+ reload ( ) : Promise < any > ;
56
+ sendEmailVerification ( actionCodeSettings ? : firebase . auth . ActionCodeSettings | null ) : Promise < any > ;
73
57
toJSON ( ) : Object ;
74
- unlink ( providerId : string ) : firebase . Promise < any > ;
75
- updateEmail ( newEmail : string ) : firebase . Promise < any > ;
76
- updatePassword ( newPassword : string ) : firebase . Promise < any > ;
77
- updatePhoneNumber ( phoneCredential : firebase . auth . AuthCredential ) : firebase . Promise < any > ;
78
- updateProfile ( profile : { displayName : string | null , photoURL : string | null } ) : firebase . Promise < any > ;
58
+ unlink ( providerId : string ) : Promise < any > ;
59
+ updateEmail ( newEmail : string ) : Promise < any > ;
60
+ updatePassword ( newPassword : string ) : Promise < any > ;
61
+ updatePhoneNumber ( phoneCredential : firebase . auth . AuthCredential ) : Promise < any > ;
62
+ updateProfile ( profile : { displayName : string | null , photoURL : string | null } ) : Promise < any > ;
79
63
}
80
64
81
65
interface UserInfo {
@@ -106,7 +90,7 @@ declare namespace firebase.app {
106
90
interface App {
107
91
auth ( ) : firebase . auth . Auth ;
108
92
database ( ) : firebase . database . Database ;
109
- delete ( ) : firebase . Promise < any > ;
93
+ delete ( ) : Promise < any > ;
110
94
messaging ( ) : firebase . messaging . Messaging ;
111
95
name : string ;
112
96
options : Object ;
@@ -124,34 +108,34 @@ declare namespace firebase.auth {
124
108
125
109
interface ApplicationVerifier {
126
110
type : string ;
127
- verify ( ) : firebase . Promise < any > ;
111
+ verify ( ) : Promise < any > ;
128
112
}
129
113
130
114
interface Auth {
131
115
app : firebase . app . App ;
132
- applyActionCode ( code : string ) : firebase . Promise < any > ;
133
- checkActionCode ( code : string ) : firebase . Promise < any > ;
134
- confirmPasswordReset ( code : string , newPassword : string ) : firebase . Promise < any > ;
135
- createUserWithEmailAndPassword ( email : string , password : string ) : firebase . Promise < any > ;
116
+ applyActionCode ( code : string ) : Promise < any > ;
117
+ checkActionCode ( code : string ) : Promise < any > ;
118
+ confirmPasswordReset ( code : string , newPassword : string ) : Promise < any > ;
119
+ createUserWithEmailAndPassword ( email : string , password : string ) : Promise < any > ;
136
120
currentUser : firebase . User | null ;
137
- fetchProvidersForEmail ( email : string ) : firebase . Promise < any > ;
138
- getRedirectResult ( ) : firebase . Promise < any > ;
121
+ fetchProvidersForEmail ( email : string ) : Promise < any > ;
122
+ getRedirectResult ( ) : Promise < any > ;
139
123
languageCode : string | null ;
140
124
onAuthStateChanged ( nextOrObserver : firebase . Observer < any , any > | ( ( a : firebase . User | null ) => any ) , error ? : ( a : firebase . auth . Error ) => any , completed ? : firebase . Unsubscribe ) : firebase . Unsubscribe ;
141
125
onIdTokenChanged ( nextOrObserver : firebase . Observer < any , any > | ( ( a : firebase . User | null ) => any ) , error ? : ( a : firebase . auth . Error ) => any , completed ? : firebase . Unsubscribe ) : firebase . Unsubscribe ;
142
- sendPasswordResetEmail ( email : string , actionCodeSettings ? : firebase . auth . ActionCodeSettings | null ) : firebase . Promise < any > ;
143
- setPersistence ( persistence : firebase . auth . Auth . Persistence ) : firebase . Promise < any > ;
144
- signInAndRetrieveDataWithCredential ( credential : firebase . auth . AuthCredential ) : firebase . Promise < any > ;
145
- signInAnonymously ( ) : firebase . Promise < any > ;
146
- signInWithCredential ( credential : firebase . auth . AuthCredential ) : firebase . Promise < any > ;
147
- signInWithCustomToken ( token : string ) : firebase . Promise < any > ;
148
- signInWithEmailAndPassword ( email : string , password : string ) : firebase . Promise < any > ;
149
- signInWithPhoneNumber ( phoneNumber : string , applicationVerifier : firebase . auth . ApplicationVerifier ) : firebase . Promise < any > ;
150
- signInWithPopup ( provider : firebase . auth . AuthProvider ) : firebase . Promise < any > ;
151
- signInWithRedirect ( provider : firebase . auth . AuthProvider ) : firebase . Promise < any > ;
152
- signOut ( ) : firebase . Promise < any > ;
126
+ sendPasswordResetEmail ( email : string , actionCodeSettings ? : firebase . auth . ActionCodeSettings | null ) : Promise < any > ;
127
+ setPersistence ( persistence : firebase . auth . Auth . Persistence ) : Promise < any > ;
128
+ signInAndRetrieveDataWithCredential ( credential : firebase . auth . AuthCredential ) : Promise < any > ;
129
+ signInAnonymously ( ) : Promise < any > ;
130
+ signInWithCredential ( credential : firebase . auth . AuthCredential ) : Promise < any > ;
131
+ signInWithCustomToken ( token : string ) : Promise < any > ;
132
+ signInWithEmailAndPassword ( email : string , password : string ) : Promise < any > ;
133
+ signInWithPhoneNumber ( phoneNumber : string , applicationVerifier : firebase . auth . ApplicationVerifier ) : Promise < any > ;
134
+ signInWithPopup ( provider : firebase . auth . AuthProvider ) : Promise < any > ;
135
+ signInWithRedirect ( provider : firebase . auth . AuthProvider ) : Promise < any > ;
136
+ signOut ( ) : Promise < any > ;
153
137
useDeviceLanguage ( ) : any ;
154
- verifyPasswordResetCode ( code : string ) : firebase . Promise < any > ;
138
+ verifyPasswordResetCode ( code : string ) : Promise < any > ;
155
139
}
156
140
157
141
interface AuthCredential {
@@ -163,7 +147,7 @@ declare namespace firebase.auth {
163
147
}
164
148
165
149
interface ConfirmationResult {
166
- confirm ( verificationCode : string ) : firebase . Promise < any > ;
150
+ confirm ( verificationCode : string ) : Promise < any > ;
167
151
verificationId : string ;
168
152
}
169
153
@@ -217,17 +201,17 @@ declare namespace firebase.auth {
217
201
class PhoneAuthProvider_Instance implements firebase . auth . AuthProvider {
218
202
constructor ( auth ? : firebase . auth . Auth | null ) ;
219
203
providerId : string ;
220
- verifyPhoneNumber ( phoneNumber : string , applicationVerifier : firebase . auth . ApplicationVerifier ) : firebase . Promise < any > ;
204
+ verifyPhoneNumber ( phoneNumber : string , applicationVerifier : firebase . auth . ApplicationVerifier ) : Promise < any > ;
221
205
}
222
206
223
207
class RecaptchaVerifier extends RecaptchaVerifier_Instance {
224
208
}
225
209
class RecaptchaVerifier_Instance implements firebase . auth . ApplicationVerifier {
226
210
constructor ( container : any | string , parameters ? : Object | null , app ? : firebase . app . App | null ) ;
227
211
clear ( ) : any ;
228
- render ( ) : firebase . Promise < any > ;
212
+ render ( ) : Promise < any > ;
229
213
type : string ;
230
- verify ( ) : firebase . Promise < any > ;
214
+ verify ( ) : Promise < any > ;
231
215
}
232
216
233
217
class TwitterAuthProvider extends TwitterAuthProvider_Instance {
@@ -276,11 +260,11 @@ declare namespace firebase.database {
276
260
}
277
261
278
262
interface OnDisconnect {
279
- cancel ( onComplete ? : ( a : Error | null ) => any ) : firebase . Promise < any > ;
280
- remove ( onComplete ? : ( a : Error | null ) => any ) : firebase . Promise < any > ;
281
- set ( value : any , onComplete ? : ( a : Error | null ) => any ) : firebase . Promise < any > ;
282
- setWithPriority ( value : any , priority : number | string | null , onComplete ? : ( a : Error | null ) => any ) : firebase . Promise < any > ;
283
- update ( values : Object , onComplete ? : ( a : Error | null ) => any ) : firebase . Promise < any > ;
263
+ cancel ( onComplete ? : ( a : Error | null ) => any ) : Promise < any > ;
264
+ remove ( onComplete ? : ( a : Error | null ) => any ) : Promise < any > ;
265
+ set ( value : any , onComplete ? : ( a : Error | null ) => any ) : Promise < any > ;
266
+ setWithPriority ( value : any , priority : number | string | null , onComplete ? : ( a : Error | null ) => any ) : Promise < any > ;
267
+ update ( values : Object , onComplete ? : ( a : Error | null ) => any ) : Promise < any > ;
284
268
}
285
269
286
270
interface Query {
@@ -291,7 +275,7 @@ declare namespace firebase.database {
291
275
limitToLast ( limit : number ) : firebase . database . Query ;
292
276
off ( eventType ? : string , callback ? : ( a : firebase . database . DataSnapshot , b ? : string | null ) => any , context ? : Object | null ) : any ;
293
277
on ( eventType : string , callback : ( a : firebase . database . DataSnapshot | null , b ? : string ) => any , cancelCallbackOrContext ? : Object | null , context ? : Object | null ) : ( a : firebase . database . DataSnapshot | null , b ? : string ) => any ;
294
- once ( eventType : string , successCallback ? : ( a : firebase . database . DataSnapshot , b ? : string ) => any , failureCallbackOrContext ? : Object | null , context ? : Object | null ) : firebase . Promise < any > ;
278
+ once ( eventType : string , successCallback ? : ( a : firebase . database . DataSnapshot , b ? : string ) => any , failureCallbackOrContext ? : Object | null , context ? : Object | null ) : Promise < any > ;
295
279
orderByChild ( path : string ) : firebase . database . Query ;
296
280
orderByKey ( ) : firebase . database . Query ;
297
281
orderByPriority ( ) : firebase . database . Query ;
@@ -309,16 +293,16 @@ declare namespace firebase.database {
309
293
parent : firebase . database . Reference | null ;
310
294
path : string ;
311
295
push ( value ? : any , onComplete ? : ( a : Error | null ) => any ) : firebase . database . ThenableReference ;
312
- remove ( onComplete ? : ( a : Error | null ) => any ) : firebase . Promise < any > ;
296
+ remove ( onComplete ? : ( a : Error | null ) => any ) : Promise < any > ;
313
297
root : firebase . database . Reference ;
314
- set ( value : any , onComplete ? : ( a : Error | null ) => any ) : firebase . Promise < any > ;
315
- setPriority ( priority : string | number | null , onComplete : ( a : Error | null ) => any ) : firebase . Promise < any > ;
316
- setWithPriority ( newVal : any , newPriority : string | number | null , onComplete ? : ( a : Error | null ) => any ) : firebase . Promise < any > ;
317
- transaction ( transactionUpdate : ( a : any ) => any , onComplete ? : ( a : Error | null , b : boolean , c : firebase . database . DataSnapshot | null ) => any , applyLocally ? : boolean ) : firebase . Promise < any > ;
318
- update ( values : Object , onComplete ? : ( a : Error | null ) => any ) : firebase . Promise < any > ;
298
+ set ( value : any , onComplete ? : ( a : Error | null ) => any ) : Promise < any > ;
299
+ setPriority ( priority : string | number | null , onComplete : ( a : Error | null ) => any ) : Promise < any > ;
300
+ setWithPriority ( newVal : any , newPriority : string | number | null , onComplete ? : ( a : Error | null ) => any ) : Promise < any > ;
301
+ transaction ( transactionUpdate : ( a : any ) => any , onComplete ? : ( a : Error | null , b : boolean , c : firebase . database . DataSnapshot | null ) => any , applyLocally ? : boolean ) : Promise < any > ;
302
+ update ( values : Object , onComplete ? : ( a : Error | null ) => any ) : Promise < any > ;
319
303
}
320
304
321
- interface ThenableReference extends firebase . database . Reference , firebase . Thenable < any > {
305
+ interface ThenableReference extends firebase . database . Reference , PromiseLike < any > {
322
306
}
323
307
324
308
function enableLogging ( logger ? : boolean | ( ( a : string ) => any ) , persistent ? : boolean ) : any ;
@@ -330,11 +314,11 @@ declare namespace firebase.database.ServerValue {
330
314
331
315
declare namespace firebase . messaging {
332
316
interface Messaging {
333
- deleteToken ( token : string ) : firebase . Promise < any > | null ;
334
- getToken ( ) : firebase . Promise < any > | null ;
317
+ deleteToken ( token : string ) : Promise < any > | null ;
318
+ getToken ( ) : Promise < any > | null ;
335
319
onMessage ( nextOrObserver : firebase . Observer < any , any > | ( ( a : Object ) => any ) ) : firebase . Unsubscribe ;
336
320
onTokenRefresh ( nextOrObserver : firebase . Observer < any , any > | ( ( a : Object ) => any ) ) : firebase . Unsubscribe ;
337
- requestPermission ( ) : firebase . Promise < any > | null ;
321
+ requestPermission ( ) : Promise < any > | null ;
338
322
setBackgroundMessageHandler ( callback : ( a : Object ) => any ) : any ;
339
323
useServiceWorker ( registration : any ) : any ;
340
324
}
@@ -356,18 +340,18 @@ declare namespace firebase.storage {
356
340
interface Reference {
357
341
bucket : string ;
358
342
child ( path : string ) : firebase . storage . Reference ;
359
- delete ( ) : firebase . Promise < any > ;
343
+ delete ( ) : Promise < any > ;
360
344
fullPath : string ;
361
- getDownloadURL ( ) : firebase . Promise < any > ;
362
- getMetadata ( ) : firebase . Promise < any > ;
345
+ getDownloadURL ( ) : Promise < any > ;
346
+ getMetadata ( ) : Promise < any > ;
363
347
name : string ;
364
348
parent : firebase . storage . Reference | null ;
365
349
put ( data : any | any | any , metadata ? : firebase . storage . UploadMetadata ) : firebase . storage . UploadTask ;
366
350
putString ( data : string , format ? : firebase . storage . StringFormat , metadata ? : firebase . storage . UploadMetadata ) : firebase . storage . UploadTask ;
367
351
root : firebase . storage . Reference ;
368
352
storage : firebase . storage . Storage ;
369
353
toString ( ) : string ;
370
- updateMetadata ( metadata : firebase . storage . SettableMetadata ) : firebase . Promise < any > ;
354
+ updateMetadata ( metadata : firebase . storage . SettableMetadata ) : Promise < any > ;
371
355
}
372
356
373
357
interface SettableMetadata {
@@ -417,12 +401,12 @@ declare namespace firebase.storage {
417
401
418
402
interface UploadTask {
419
403
cancel ( ) : boolean ;
420
- catch ( onRejected : ( a : Error ) => any ) : firebase . Promise < any > ;
404
+ catch ( onRejected : ( a : Error ) => any ) : Promise < any > ;
421
405
on ( event : firebase . storage . TaskEvent , nextOrObserver ? : firebase . Observer < any , any > | null | ( ( a : Object ) => any ) , error ? : ( ( a : Error ) => any ) | null , complete ? : ( firebase . Unsubscribe ) | null ) : Function ;
422
406
pause ( ) : boolean ;
423
407
resume ( ) : boolean ;
424
408
snapshot : firebase . storage . UploadTaskSnapshot ;
425
- then ( onFulfilled ? : ( ( a : firebase . storage . UploadTaskSnapshot ) => any ) | null , onRejected ? : ( ( a : Error ) => any ) | null ) : firebase . Promise < any > ;
409
+ then ( onFulfilled ? : ( ( a : firebase . storage . UploadTaskSnapshot ) => any ) | null , onRejected ? : ( ( a : Error ) => any ) | null ) : Promise < any > ;
426
410
}
427
411
428
412
interface UploadTaskSnapshot {
0 commit comments