Skip to content

Commit 16ca08b

Browse files
rockwotjjshcrowthe
authored andcommitted
Remove the need to return undefined in typings (#126)
* Remove the need to return undefined Fixes: https://stackoverflow.com/questions/45386915/wrong-function-definition-in-typescript * Also fix firebase.d.ts
1 parent 7ccc77c commit 16ca08b

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

typings/app.d.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616
declare namespace firebase {
17-
type CompleteFn = ( ) => undefined ;
17+
type CompleteFn = ( ) => void ;
1818

1919
interface FirebaseError {
2020
code : string ;
@@ -35,7 +35,7 @@ declare namespace firebase {
3535
static resolve < T > (value ? : T ) : firebase.Promise < T > ;
3636
}
3737
class Promise_Instance < T > implements firebase.Thenable < any > {
38-
constructor (resolver : (a : (a : T ) => undefined , b : (a : Error ) => undefined ) => any ) ;
38+
constructor (resolver : (a : (a : T ) => void , b : (a : Error ) => void ) => any ) ;
3939
catch (onReject ? : (a : Error ) => any ) : firebase.Thenable < any > ;
4040
then (onResolve ? : (a : T ) => any , onReject ? : (a : Error ) => any ) : firebase.Promise < any > ;
4141
}
@@ -47,7 +47,7 @@ declare namespace firebase {
4747
then (onResolve ? : (a : T ) => any , onReject ? : (a : Error ) => any ) : firebase.Thenable < any > ;
4848
}
4949

50-
type Unsubscribe = ( ) => undefined ;
50+
type Unsubscribe = ( ) => void ;
5151

5252
interface User extends firebase.UserInfo {
5353
delete ( ) : firebase.Promise < any > ;

typings/firebase.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616
declare namespace firebase {
17-
type CompleteFn = ( ) => undefined ;
17+
type CompleteFn = ( ) => void ;
1818

1919
interface FirebaseError {
2020
code : string ;
@@ -47,7 +47,7 @@ declare namespace firebase {
4747
then (onResolve ? : (a : T ) => any , onReject ? : (a : Error ) => any ) : firebase.Thenable < any > ;
4848
}
4949

50-
type Unsubscribe = ( ) => undefined ;
50+
type Unsubscribe = ( ) => void ;
5151

5252
interface User extends firebase.UserInfo {
5353
delete ( ) : firebase.Promise < any > ;

0 commit comments

Comments
 (0)