@skrillex1224/playwright-toolkit 2.1.96 → 2.1.98
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +51 -33
- package/dist/index.cjs.map +3 -3
- package/dist/index.js +51 -33
- package/dist/index.js.map +3 -3
- package/index.d.ts +3 -11
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -360,21 +360,13 @@ export interface SseInterceptOptions {
|
|
|
360
360
|
onTimeout?: SseInterceptOnTimeoutCallback;
|
|
361
361
|
initialTimeout?: number;
|
|
362
362
|
overallTimeout?: number;
|
|
363
|
+
autoUnroute?: boolean;
|
|
364
|
+
firstMatchOnly?: boolean;
|
|
363
365
|
}
|
|
364
366
|
|
|
365
|
-
/** SSE 拦截取消函数 */
|
|
366
|
-
export type SseCancelFunction = () => Promise<void>;
|
|
367
|
-
|
|
368
|
-
/** SSE 拦截返回结果:[Promise, 取消函数] */
|
|
369
|
-
export type SseInterceptResult = [Promise<any>, SseCancelFunction];
|
|
370
|
-
|
|
371
367
|
export interface SseModule {
|
|
372
368
|
parseSseStream(sseText: string): any[];
|
|
373
|
-
|
|
374
|
-
* 拦截 SSE 流
|
|
375
|
-
* @returns [promise, cancel] - promise 为流数据的 Promise,cancel 为取消监听的函数
|
|
376
|
-
*/
|
|
377
|
-
intercept(page: Page, urlPattern: string | RegExp, options?: SseInterceptOptions): SseInterceptResult;
|
|
369
|
+
intercept(page: Page, urlPattern: string | RegExp, options?: SseInterceptOptions): Promise<any>;
|
|
378
370
|
}
|
|
379
371
|
|
|
380
372
|
// =============================================================================
|