Closed sfali23 closed 8 years ago
You would need to write the definition in "global" mode, which does not allow any top-level import
or export
. It may be possible to use UMD mode in TypeScript 2.0.
Sorry, completely forgot about this, this is what I thought as well, wanted to make sure.
Regards,
Farhan
Hello,
I am currently writing a typing for WebdriverIO.
WebdriverIO has two modes,
standalone
andwdio
test runner based onmocha
.In standalone mode client is responsible for initializing and closing browser session and more over in standalone mode API works synchronously.
In wdio mode test runner will initialize and clean up
browser
object and API works asynchronously. Thisbrowser
object available globally when run via test runner.I have a working code for the standalone mode. My question is what can be done to make this global
browser
object available from typescript library.I am seeing examples to make global module but not sure whether this is the best way to do it?
Thanks in advance.
Regards,
Farhan