@skrillex1224/playwright-toolkit 2.1.95 → 2.1.97
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 +41 -36
- package/dist/index.cjs.map +3 -3
- package/dist/index.js +41 -36
- package/dist/index.js.map +3 -3
- package/index.d.ts +2 -11
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -360,21 +360,12 @@ export interface SseInterceptOptions {
|
|
|
360
360
|
onTimeout?: SseInterceptOnTimeoutCallback;
|
|
361
361
|
initialTimeout?: number;
|
|
362
362
|
overallTimeout?: number;
|
|
363
|
+
autoUnroute?: boolean;
|
|
363
364
|
}
|
|
364
365
|
|
|
365
|
-
/** SSE 拦截取消函数 */
|
|
366
|
-
export type SseCancelFunction = () => Promise<void>;
|
|
367
|
-
|
|
368
|
-
/** SSE 拦截返回结果:[Promise, 取消函数] */
|
|
369
|
-
export type SseInterceptResult = [Promise<any>, SseCancelFunction];
|
|
370
|
-
|
|
371
366
|
export interface SseModule {
|
|
372
367
|
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;
|
|
368
|
+
intercept(page: Page, urlPattern: string | RegExp, options?: SseInterceptOptions): Promise<any>;
|
|
378
369
|
}
|
|
379
370
|
|
|
380
371
|
// =============================================================================
|