From 1b0aa6f7ce5a90a75872b60cf532917a28eaeeab Mon Sep 17 00:00:00 2001 From: Massimo Hamilton Date: Fri, 16 Dec 2016 09:43:46 +0000 Subject: [PATCH] fix(element): Fix typing of ElementFinder.then --- lib/element.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/element.ts b/lib/element.ts index 3dca28f81..191d0b0ef 100644 --- a/lib/element.ts +++ b/lib/element.ts @@ -792,7 +792,9 @@ export class ElementArrayFinder extends WebdriverWebElement { export class ElementFinder extends WebdriverWebElement { parentElementArrayFinder: ElementArrayFinder; elementArrayFinder_: ElementArrayFinder; - then: (fn: Function, errorFn?: Function) => wdpromise.Promise = null; + then?: + (fn: (value: any) => {} | wdpromise.IThenable, + errorFn?: (error: any) => any) => wdpromise.Promise = null; constructor(public browser_: ProtractorBrowser, elementArrayFinder: ElementArrayFinder) { super();