If you wish to avoid downgrading, you can resolve the import in this manner for protractor version 5.4.2:
import { ElementHelper, ProtractorBrowser } from './browser';
import { ElementArrayFinder, ElementFinder } from './element';
import { ProtractorExpectedConditions } from './expectedConditions';
import { ProtractorBy } from './locators';
import { Ptor } from './ptor';
export { ActionSequence, Browser, Builder, Button, Capabilities, Capability, error, EventEmitter, FileDetector, Key, logging, promise, Session, until, WebDriver, WebElement, WebElementPromise } from 'selenium-webdriver';
export { ElementHelper, ProtractorBrowser } from './browser';
export { Config } from './config';
export { ElementArrayFinder, ElementFinder } from './element';
export { ProtractorExpectedConditions } from './expectedConditions';
export { Locator, ProtractorBy } from './locators';
export { PluginConfig, ProtractorPlugin } from './plugins';
export { Ptor } from './ptor';
export { Runner } from './runner';
export declare let utils: {
firefox: any;
http: any;
remote: any;
};
export declare let Command: any;
export declare let CommandName: any;
export declare let protractor: Ptor;
export declare let browser: ProtractorBrowser;
export declare let $: (search: string) => ElementFinder;
export declare let $$: (search: string) => ElementArrayFinder;
export declare let element: ElementHelper;
export declare let By: ProtractorBy;
export declare let by: ProtractorBy;
export declare let ExpectedConditions: ProtractorExpectedConditions;
The issue here is a duplicate import that needs to be removed. Below is the patch to address it:
diff -r d5e827235972 yf/src/myapp/node_modules/protractor/built/index.d.ts
--- a/yf/src/myapp/node_modules/protractor/built/index.d.ts Sun Jan 19 20:49:39 2020 +0100
+++ b/yf/src/myapp/node_modules/protractor/built/index.d.ts Sun Jan 19 21:13:41 2020 +0100
@@ -2,7 +2,6 @@
import { ElementArrayFinder, ElementFinder } from './element';
import { ProtractorExpectedConditions } from './expectedConditions';
import { ProtractorBy } from './locators';
-import { PluginConfig, ProtractorPlugin } from './plugins';
import { Ptor } from './ptor';
export { ActionSequence, Browser, Builder, Button, Capabilities, Capability, error, EventEmitter, FileDetector, Key, logging, promise, Session, until, WebDriver, WebElement, WebElementPromise } from 'selenium-webdriver';
export { ElementHelper, ProtractorBrowser } from './browser';
@@ -10,10 +9,9 @@
export { ElementArrayFinder, ElementFinder } from './element';
export { ProtractorExpectedConditions } from './expectedConditions';
export { Locator, ProtractorBy } from './locators';
+export { PluginConfig, ProtractorPlugin } from './plugins';
export { Ptor } from './ptor';
export { Runner } from './runner';
-export declare type PluginConfig = PluginConfig;
-export declare type ProtractorPlugin = ProtractorPlugin;
export declare let utils: {
firefox: any;
http: any;