Fix getLocation return type

Also renamed GeoLocation type because it was being merged with Location type.
This commit is contained in:
Pablo Moleri
2017-01-18 14:03:23 -03:00
parent bfcd32a2bc
commit 65701d7b2b
+19 -16
View File
@@ -352,36 +352,37 @@ declare namespace WebdriverIO {
): Client<P>;
getHTML<P>(includeSelectorTag: boolean): Client<P>;
getLocation(selector?: string): Size;
getLocation(selector: string, axis: string): number;
getLocation(axis: string): number;
getLocation(selector?: string): Location;
getLocation(selector: string, axis: Axis): number;
getLocation(axis: Axis): number;
getLocation<P>(selector?: string): Client<P>;
getLocation<P>(
selector: string,
axis: string
axis: Axis
): Client<P>;
getLocation<P>(axis: string): Client<P>;
getLocation<P>(axis: Axis): Client<P>;
getLocationInView(selector: string): Size;
getLocationInView(selector: string): Size[];
getLocationInView(): Size;
getLocationInView(): Size[];
getLocationInView(selector: string): Location;
getLocationInView(selector: string): Location[];
getLocationInView(): Location;
getLocationInView(): Location[];
getLocationInView(
selector: string,
axis: string
axis: Axis
): number;
getLocationInView(
selector: string,
axis: string
axis: Axis
): number[];
getLocationInView(axis: string): number;
getLocationInView(axis: string): number[];
getLocationInView(axis: Axis): number;
getLocationInView(axis: Axis): number[];
getLocationInView<P>(selector?: string): Client<P>;
getLocationInView<P>(
selector: string,
axis: string
axis: Axis
): Client<P>;
getLocationInView<P>(axis: string): Client<P>;
getLocationInView<P>(axis: Axis): Client<P>;
getSource(): Client<string>;
getSource<P>(): Client<P>;
@@ -428,7 +429,7 @@ declare namespace WebdriverIO {
value: any;
}
export interface Location {
export interface GeoLocation {
latitude: number;
longitude: number;
altitude: number;
@@ -983,6 +984,8 @@ declare namespace WebdriverIO {
switchTab<P>(windowHandle?: string): Client<P>;
}
export type Axis = "x" | "y";
export interface Options {
protocol: string;
waitforTimeout: number;