Return Firebase as type from $ref

This is what really happens in the source code for AngularFire 1.1.1 (and always has), for both AngularFireObject and AngularFireArray.

See https://github.com/firebase/angularfire/blob/1aa81906cdfb3e35e7c31fc6dee8a4922b1470ae/src/FirebaseObject.js#L125
This commit is contained in:
Frank Bille
2015-05-26 16:04:25 +02:00
parent f23cd55e31
commit 3eb36c97b6
+2 -2
View File
@@ -33,7 +33,7 @@ interface AngularFireObject extends AngularFireSimpleObject {
$loaded(resolve?: (x: AngularFireObject) => ng.IHttpPromise<{}>, reject?: (err: any) => any): ng.IPromise<AngularFireObject>;
$loaded(resolve?: (x: AngularFireObject) => ng.IPromise<{}>, reject?: (err: any) => any): ng.IPromise<AngularFireObject>;
$loaded(resolve?: (x: AngularFireObject) => void, reject?: (err: any) => any): ng.IPromise<AngularFireObject>;
$ref(): AngularFire;
$ref(): Firebase;
$bindTo(scope: ng.IScope, varName: string): ng.IPromise<any>;
$watch(callback: Function, context?: any): Function;
$destroy(): void;
@@ -53,7 +53,7 @@ interface AngularFireArray extends Array<AngularFireSimpleObject> {
$loaded(resolve?: (x: AngularFireArray) => ng.IHttpPromise<{}>, reject?: (err: any) => any): ng.IPromise<AngularFireArray>;
$loaded(resolve?: (x: AngularFireArray) => ng.IPromise<{}>, reject?: (err: any) => any): ng.IPromise<AngularFireArray>;
$loaded(resolve?: (x: AngularFireArray) => void, reject?: (err: any) => any): ng.IPromise<AngularFireArray>;
$ref(): AngularFire;
$ref(): Firebase;
$watch(cb: (event: string, key: string, prevChild: string) => void, context?: any): Function;
$destroy(): void;
}