Within my Angular CLI v7.3.6 project, there is a protractor.conf.js
file that I'm looking to enhance with @ts-check
in VSCode. When using @ts-check
, I aim to execute the browser.getCapabilities()
function in the onPrepare()
callback but encountered an error message from VSCode stating '
Unable to find name 'browser'. ts(2304)
'.
I attempted to include the browser by registering it into Global
. However, using the <reference path="..."/>
syntax did not result in declaring browser
.
/// <reference path="../node_modules/protractor/built/index.d.ts" />
There seems to be uncertainty on how to define Global properties with types within a JavaScript file (Node.js).
Any suggestions on how to properly declare the type of browser
in the protractor.conf.js
file?