From 65701d7b2b3d60b309a7acd2fda6c10d2a77aec1 Mon Sep 17 00:00:00 2001 From: Pablo Moleri Date: Wed, 18 Jan 2017 14:03:23 -0300 Subject: [PATCH] Fix getLocation return type Also renamed GeoLocation type because it was being merged with Location type. --- webdriverio/index.d.ts | 35 +++++++++++++++++++---------------- 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/webdriverio/index.d.ts b/webdriverio/index.d.ts index fbc6925fa9..f033ec2bfc 100644 --- a/webdriverio/index.d.ts +++ b/webdriverio/index.d.ts @@ -352,36 +352,37 @@ declare namespace WebdriverIO { ): Client

; getHTML

(includeSelectorTag: boolean): Client

; - 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

(selector?: string): Client

; getLocation

( selector: string, - axis: string + axis: Axis ): Client

; - getLocation

(axis: string): Client

; + getLocation

(axis: Axis): Client

; - 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

(selector?: string): Client

; getLocationInView

( selector: string, - axis: string + axis: Axis ): Client

; - getLocationInView

(axis: string): Client

; + getLocationInView

(axis: Axis): Client

; + getSource(): Client; getSource

(): Client

; @@ -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

(windowHandle?: string): Client

; } + export type Axis = "x" | "y"; + export interface Options { protocol: string; waitforTimeout: number;