mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-04 06:47:03 +00:00
Merge pull request #16345 from donaldpipowitch/patch-6
added promise.USE_PROMISE_MANAGER to selenium-webdriver
This commit is contained in:
Vendored
+7
@@ -557,6 +557,13 @@ export namespace logging {
|
||||
export namespace promise {
|
||||
// region Functions
|
||||
|
||||
/**
|
||||
* Set `USE_PROMISE_MANAGER` to `false` to disable the promise manager.
|
||||
* This is useful, if you use async/await (see https://github.com/SeleniumHQ/selenium/issues/2969
|
||||
* and https://github.com/SeleniumHQ/selenium/issues/3037).
|
||||
*/
|
||||
let USE_PROMISE_MANAGER: boolean;
|
||||
|
||||
/**
|
||||
* Given an array of promises, will return a promise that will be fulfilled
|
||||
* with the fulfillment values of the input array's values. If any of the
|
||||
|
||||
@@ -961,3 +961,7 @@ async function TestAsyncAwaitable() {
|
||||
let thenable: webdriver.promise.Promise<string> = new webdriver.promise.Promise<string>((resolve, reject) => resolve('foo'));
|
||||
let str: string = await thenable;
|
||||
}
|
||||
|
||||
function TestPromiseManagerFlag() {
|
||||
webdriver.promise.USE_PROMISE_MANAGER = false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user