[puppeteer] fix v1.10.0 definition of waitForTarget

hello! i'm using the fancy new waitForTarget and the definition appears to be slightly off. `options` is optional and the return is a `Target` Promise, not `void`. looking at the `BrowserContext` version, it's the same problem due to the new `Timeoutable` changes made in this recent version. i changed the one definition locally and the world did not seem to explode. i'm using Github's nasty PR generator, let me know if you'd prefer i edit this with the template. thanks!
This commit is contained in:
Larry Gadea
2018-11-25 20:36:20 -05:00
committed by GitHub
parent 36a32d8a72
commit 6ffa94cda5
+1 -1
View File
@@ -1715,7 +1715,7 @@ export interface Page extends EventEmitter, FrameBase {
}
export interface TargetAwaiter {
waitForTarget(predicate: (target: Target) => boolean, options: Timeoutable): Promise<void>;
waitForTarget(predicate: (target: Target) => boolean, options?: Timeoutable): Promise<Target>;
}
/** A Browser is created when Puppeteer connects to a Chromium instance, either through puppeteer.launch or puppeteer.connect. */