mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-06-28 14:20:12 +00:00
[puppeteer] Add Request.abort errorCode argument (#25345)
This commit is contained in:
committed by
Wesley Wigham
parent
312bad92cc
commit
96816bfc6e
16
types/puppeteer/index.d.ts
vendored
16
types/puppeteer/index.d.ts
vendored
@@ -604,6 +604,20 @@ export type ResourceType =
|
||||
| "manifest"
|
||||
| "other";
|
||||
|
||||
export type ErrorCode =
|
||||
| "aborted"
|
||||
| "accessdenied"
|
||||
| "addressunreachable"
|
||||
| "connectionaborted"
|
||||
| "connectionclosed"
|
||||
| "connectionfailed"
|
||||
| "connectionrefused"
|
||||
| "connectionreset"
|
||||
| "internetdisconnected"
|
||||
| "namenotresolved"
|
||||
| "timedout"
|
||||
| "failed";
|
||||
|
||||
export interface Overrides {
|
||||
url?: string;
|
||||
method?: HttpMethod;
|
||||
@@ -618,7 +632,7 @@ export interface Request {
|
||||
* To use this, request interception should be enabled with `page.setRequestInterception`.
|
||||
* @throws An exception is immediately thrown if the request interception is not enabled.
|
||||
*/
|
||||
abort(): Promise<void>;
|
||||
abort(errorCode?: ErrorCode): Promise<void>;
|
||||
|
||||
/**
|
||||
* Continues request with optional request overrides.
|
||||
|
||||
Reference in New Issue
Block a user