mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
feat(types): improve type of predicate function (#6997)
From the DefinitelyTyped @types/puppeteer package:
c43191a8f7/types/puppeteer/index.d.ts (L1883-L1885)
This commit is contained in:
parent
c39c81d016
commit
943477cc1e
@ -1408,7 +1408,7 @@ export class Page extends EventEmitter {
|
||||
}
|
||||
|
||||
async waitForRequest(
|
||||
urlOrPredicate: string | Function,
|
||||
urlOrPredicate: string | ((req: HTTPRequest) => boolean | Promise<boolean>),
|
||||
options: { timeout?: number } = {}
|
||||
): Promise<HTTPRequest> {
|
||||
const { timeout = this._timeoutSettings.timeout() } = options;
|
||||
@ -1428,7 +1428,9 @@ export class Page extends EventEmitter {
|
||||
}
|
||||
|
||||
async waitForResponse(
|
||||
urlOrPredicate: string | Function,
|
||||
urlOrPredicate:
|
||||
| string
|
||||
| ((res: HTTPResponse) => boolean | Promise<boolean>),
|
||||
options: { timeout?: number } = {}
|
||||
): Promise<HTTPResponse> {
|
||||
const { timeout = this._timeoutSettings.timeout() } = options;
|
||||
|
Loading…
Reference in New Issue
Block a user