Fix getLocation return type

Also renamed GeoLocation type because it was being merged with Location type.
This commit is contained in:
Pablo Moleri 2016-11-29 16:21:36 -03:00
parent 639fda6d30
commit 2c6023c8a4

View File

@ -313,11 +313,11 @@ declare namespace WebdriverIO {
callback: (err: any, html: string | string[]) => P
): Client<P>;
getLocation(selector: string): Client<Size>;
getLocation(selector: string): Client<Location>;
getLocation(selector: string, axis: string): Client<number>;
getLocation<P>(
selector: string,
callback: (err: any, size: Size) => P
callback: (err: any, location: Location) => P
): Client<P>;
getLocation<P>(
selector: string,
@ -325,11 +325,11 @@ declare namespace WebdriverIO {
callback: (err: any, location: number) => P
): Client<P>;
getLocationInView(selector: string): Client<Size | Size[]>;
getLocationInView(selector: string): Client<Location | Location[]>;
getLocationInView(selector: string, axis: string): Client<number | number[]>;
getLocationInView<P>(
selector: string,
callback: (err: any, size: Size | Size[]) => P
callback: (err: any, location: Location | Location[]) => P
): Client<P>;
getLocationInView<P>(
selector: string,
@ -395,7 +395,7 @@ declare namespace WebdriverIO {
value: any;
}
export interface Location {
export interface GeoLocation {
latitude: number;
longitude: number;
altitude: number;