From 967c4f5e3b88a90e9c44ef983df85b00cde0ac52 Mon Sep 17 00:00:00 2001 From: Max Schmitt Date: Mon, 10 Feb 2025 13:05:17 +0100 Subject: [PATCH] chore: fix Locator type issues (#34705) --- docs/src/api/class-apirequest.md | 2 +- docs/src/api/class-apirequestcontext.md | 2 +- docs/src/api/class-browsercontext.md | 2 +- docs/src/api/params.md | 2 +- packages/playwright-core/src/client/types.ts | 2 +- packages/playwright-core/types/types.d.ts | 10 +++++----- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/docs/src/api/class-apirequest.md b/docs/src/api/class-apirequest.md index feea5b8378..f1465cb8c6 100644 --- a/docs/src/api/class-apirequest.md +++ b/docs/src/api/class-apirequest.md @@ -81,7 +81,7 @@ Methods like [`method: APIRequestContext.get`] take the base URL into considerat - `records` <[Array]<[Object]>> - `key` ?<[Object]> - `keyEncoded` ?<[Object]> if `key` is not JSON-serializable, this contains an encoded version that preserves types. - - `value` <[Object]> + - `value` ?<[Object]> - `valueEncoded` ?<[Object]> if `value` is not JSON-serializable, this contains an encoded version that preserves types. Populates context with given storage state. This option can be used to initialize context with logged-in information diff --git a/docs/src/api/class-apirequestcontext.md b/docs/src/api/class-apirequestcontext.md index 838625bcbf..165b9f3bd6 100644 --- a/docs/src/api/class-apirequestcontext.md +++ b/docs/src/api/class-apirequestcontext.md @@ -897,7 +897,7 @@ context cookies from the response. The method will automatically follow redirect - `records` <[Array]<[Object]>> - `key` ?<[Object]> - `keyEncoded` ?<[Object]> if `key` is not JSON-serializable, this contains an encoded version that preserves types. - - `value` <[Object]> + - `value` ?<[Object]> - `valueEncoded` ?<[Object]> if `value` is not JSON-serializable, this contains an encoded version that preserves types. Returns storage state for this request context, contains current cookies and local storage snapshot if it was passed to the constructor. diff --git a/docs/src/api/class-browsercontext.md b/docs/src/api/class-browsercontext.md index 156a577504..f831bd4cae 100644 --- a/docs/src/api/class-browsercontext.md +++ b/docs/src/api/class-browsercontext.md @@ -1528,7 +1528,7 @@ Whether to emulate network being offline for the browser context. - `records` <[Array]<[Object]>> - `key` ?<[Object]> - `keyEncoded` ?<[Object]> if `key` is not JSON-serializable, this contains an encoded version that preserves types. - - `value` <[Object]> + - `value` ?<[Object]> - `valueEncoded` ?<[Object]> if `value` is not JSON-serializable, this contains an encoded version that preserves types. Returns storage state for this browser context, contains current cookies, local storage snapshot and IndexedDB snapshot. diff --git a/docs/src/api/params.md b/docs/src/api/params.md index f2d8734336..920ba10943 100644 --- a/docs/src/api/params.md +++ b/docs/src/api/params.md @@ -281,7 +281,7 @@ Specify environment variables that will be visible to the browser. Defaults to ` - `records` <[Array]<[Object]>> - `key` ?<[Object]> - `keyEncoded` ?<[Object]> if `key` is not JSON-serializable, this contains an encoded version that preserves types. - - `value` <[Object]> + - `value` ?<[Object]> - `valueEncoded` ?<[Object]> if `value` is not JSON-serializable, this contains an encoded version that preserves types. Learn more about [storage state and auth](../auth.md). diff --git a/packages/playwright-core/src/client/types.ts b/packages/playwright-core/src/client/types.ts index 5d232e9607..2cad775712 100644 --- a/packages/playwright-core/src/client/types.ts +++ b/packages/playwright-core/src/client/types.ts @@ -37,7 +37,7 @@ export type SelectOptionOptions = { force?: boolean, timeout?: number }; export type FilePayload = { name: string, mimeType: string, buffer: Buffer }; export type StorageState = { cookies: channels.NetworkCookie[], - origins: channels.OriginStorage[] + origins: channels.OriginStorage[], }; export type SetStorageState = { cookies?: channels.SetNetworkCookie[], diff --git a/packages/playwright-core/types/types.d.ts b/packages/playwright-core/types/types.d.ts index 5a74ee6d76..cdd4dcb930 100644 --- a/packages/playwright-core/types/types.d.ts +++ b/packages/playwright-core/types/types.d.ts @@ -9351,7 +9351,7 @@ export interface BrowserContext { */ keyEncoded?: Object; - value: Object; + value?: Object; /** * if `value` is not JSON-serializable, this contains an encoded version that preserves types. @@ -10170,7 +10170,7 @@ export interface Browser { */ keyEncoded?: Object; - value: Object; + value?: Object; /** * if `value` is not JSON-serializable, this contains an encoded version that preserves types. @@ -17758,7 +17758,7 @@ export interface APIRequest { */ keyEncoded?: Object; - value: Object; + value?: Object; /** * if `value` is not JSON-serializable, this contains an encoded version that preserves types. @@ -18616,7 +18616,7 @@ export interface APIRequestContext { */ keyEncoded?: Object; - value: Object; + value?: Object; /** * if `value` is not JSON-serializable, this contains an encoded version that preserves types. @@ -22512,7 +22512,7 @@ export interface BrowserContextOptions { */ keyEncoded?: Object; - value: Object; + value?: Object; /** * if `value` is not JSON-serializable, this contains an encoded version that preserves types.