add types in client

This commit is contained in:
Shahzad 2025-02-27 10:48:17 +01:00
parent 9542eefc3e
commit 4e4735c49a
2 changed files with 12 additions and 1 deletions

View file

@ -19,6 +19,7 @@ import { Readable } from 'stream';
import { ReadStream } from 'fs'; import { ReadStream } from 'fs';
import { Protocol } from './protocol'; import { Protocol } from './protocol';
import { Serializable, EvaluationArgument, PageFunction, PageFunctionOn, SmartHandle, ElementHandleForTag, BindingSource } from './structs'; import { Serializable, EvaluationArgument, PageFunction, PageFunctionOn, SmartHandle, ElementHandleForTag, BindingSource } from './structs';
import {APIRequestEvent, APIRequestFinishedEvent} from "playwright-core/lib/server/fetch";
type PageWaitForSelectorOptionsNotHidden = PageWaitForSelectorOptions & { type PageWaitForSelectorOptionsNotHidden = PageWaitForSelectorOptions & {
state?: 'visible'|'attached'; state?: 'visible'|'attached';
@ -18665,6 +18666,17 @@ export interface APIRequestContext {
}>; }>;
[Symbol.asyncDispose](): Promise<void>; [Symbol.asyncDispose](): Promise<void>;
/**
* Emitted when a request is issued from API request context. The event will be emitted after the request is issued
*/
on(event: 'apiRequest', listener: (request: APIRequestEvent) => any): this;
/**
* Emitted when a request finishes successfully after downloading the response body. For a successful response, the
* sequence of events is `request`, `response` and `requestfinished`.
*/
on(event: 'apiRequestfinished', listener: (request: APIRequestFinishedEvent) => any): this;
} }
/** /**

View file

@ -18667,7 +18667,6 @@ export interface APIRequestContext {
[Symbol.asyncDispose](): Promise<void>; [Symbol.asyncDispose](): Promise<void>;
/** /**
* Emitted when a request is issued from API request context. The event will be emitted after the request is issued * Emitted when a request is issued from API request context. The event will be emitted after the request is issued
*/ */