types: allow readonly tuples to be used as ReporterDescription

This commit is contained in:
Mateusz Burzyński 2024-04-16 13:37:05 +02:00
parent 563c9baf00
commit 7bc233e77f
2 changed files with 6 additions and 4 deletions

View file

@ -18,7 +18,7 @@
import type { APIRequestContext, Browser, BrowserContext, BrowserContextOptions, Page, LaunchOptions, ViewportSize, Geolocation, HTTPCredentials, Locator, APIResponse, PageScreenshotOptions } from 'playwright-core';
export * from 'playwright-core';
export type ReporterDescription =
export type ReporterDescription = Readonly<
['blob'] | ['blob', { outputDir?: string, fileName?: string }] |
['dot'] |
['line'] |
@ -28,7 +28,8 @@ export type ReporterDescription =
['json'] | ['json', { outputFile?: string }] |
['html'] | ['html', { outputFolder?: string, open?: 'always' | 'never' | 'on-failure', host?: string, port?: number, attachmentsBaseURL?: string }] |
['null'] |
[string] | [string, any];
[string] | [string, any]
>;
type UseOptions<TestArgs, WorkerArgs> = Partial<WorkerArgs> & Partial<TestArgs>;

View file

@ -17,7 +17,7 @@
import type { APIRequestContext, Browser, BrowserContext, BrowserContextOptions, Page, LaunchOptions, ViewportSize, Geolocation, HTTPCredentials, Locator, APIResponse, PageScreenshotOptions } from 'playwright-core';
export * from 'playwright-core';
export type ReporterDescription =
export type ReporterDescription = Readonly<
['blob'] | ['blob', { outputDir?: string, fileName?: string }] |
['dot'] |
['line'] |
@ -27,7 +27,8 @@ export type ReporterDescription =
['json'] | ['json', { outputFile?: string }] |
['html'] | ['html', { outputFolder?: string, open?: 'always' | 'never' | 'on-failure', host?: string, port?: number, attachmentsBaseURL?: string }] |
['null'] |
[string] | [string, any];
[string] | [string, any]
>;
type UseOptions<TestArgs, WorkerArgs> = Partial<WorkerArgs> & Partial<TestArgs>;