From 3e4bc2708e01b5326fccd444a70569b5555a6df8 Mon Sep 17 00:00:00 2001 From: Georgii Dolzhykov Date: Wed, 26 Oct 2016 11:35:52 +0300 Subject: [PATCH] chore(types): fix types for element.all(...) (#3656) --- lib/browser.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/browser.ts b/lib/browser.ts index 309d733b0..4736fd91a 100644 --- a/lib/browser.ts +++ b/lib/browser.ts @@ -89,7 +89,7 @@ function ptorMixin(to: any, from: any, fnName: string, setupFn?: Function) { export interface ElementHelper extends Function { (locator: Locator): ElementFinder; - all?: (locator: Locator) => ElementArrayFinder; + all: (locator: Locator) => ElementArrayFinder; } /** @@ -100,9 +100,9 @@ export interface ElementHelper extends Function { * @returns {function(webdriver.Locator): ElementFinder} */ function buildElementHelper(browser: ProtractorBrowser): ElementHelper { - let element: ElementHelper = (locator: Locator) => { + let element = ((locator: Locator) => { return new ElementArrayFinder(browser).all(locator).toElementFinder_(); - }; + }) as ElementHelper; element.all = (locator: Locator) => {