From c3978ec166760ac07db01e700c4aaaa19d9b5c38 Mon Sep 17 00:00:00 2001 From: Craig Date: Thu, 8 Dec 2016 17:34:38 -0800 Subject: [PATCH] fix(revert): element(locator).then should not appear in the docs and change reverted. (#3808) - change comments to not be in JSDoc format - reverts change `element(locator).then` --- lib/element.ts | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/lib/element.ts b/lib/element.ts index 05360cf89..bba6d985a 100644 --- a/lib/element.ts +++ b/lib/element.ts @@ -787,21 +787,7 @@ export class ElementArrayFinder extends WebdriverWebElement { export class ElementFinder extends WebdriverWebElement { parentElementArrayFinder: ElementArrayFinder; elementArrayFinder_: ElementArrayFinder; - - /** - * Access the underlying actionResult of ElementFinder. - * - * @alias element(locator).then(thenFunction) - * @param {function(webdriver.promise.Promise)} fn Function which takes - * the value of the underlying actionResult. - * @param {function(Error)} errorFn - * - * @returns {webdriver.promise.Promise} Promise which contains the results - * of evaluating fn. - */ - then(fn: Function, errorFn?: Function): wdpromise.Promise { - return null; - } + then: (fn: Function, errorFn?: Function) => wdpromise.Promise = null; constructor(public browser_: ProtractorBrowser, elementArrayFinder: ElementArrayFinder) { super(); @@ -813,6 +799,7 @@ export class ElementFinder extends WebdriverWebElement { // Only have a `then` method if the parent element array finder // has action results. if (this.parentElementArrayFinder.actionResults_) { + // Access the underlying actionResult of ElementFinder. this.then = (fn: (value: any) => {} | wdpromise.IThenable<{}>, errorFn?: (error: any) => any) => { return this.elementArrayFinder_.then((actionResults: any) => {