diff --git a/docs/api/index.md b/docs/api/index.md index 47af50bc685..3b7a3e99eac 100644 --- a/docs/api/index.md +++ b/docs/api/index.md @@ -160,7 +160,6 @@ sidebar_label: API | [KnownDevices](./puppeteer.knowndevices.md) | A list of devices to be used with [Page.emulate()](./puppeteer.page.emulate.md). | | [launch](./puppeteer.launch.md) | | | [MouseButton](./puppeteer.mousebutton.md) | Enum of valid mouse buttons. | -| [networkConditions](./puppeteer.networkconditions.md) | | | [PredefinedNetworkConditions](./puppeteer.predefinednetworkconditions.md) | A list of network conditions to be used with [Page.emulateNetworkConditions()](./puppeteer.page.emulatenetworkconditions.md). | | [puppeteer](./puppeteer.puppeteer.md) | | | [trimCache](./puppeteer.trimcache.md) | | diff --git a/docs/api/puppeteer.networkconditions.md b/docs/api/puppeteer.networkconditions.md index 8a7e2926984..6519b836605 100644 --- a/docs/api/puppeteer.networkconditions.md +++ b/docs/api/puppeteer.networkconditions.md @@ -1,18 +1,19 @@ --- -sidebar_label: networkConditions +sidebar_label: NetworkConditions --- -# networkConditions variable - -> Warning: This API is now obsolete. -> -> Import [PredefinedNetworkConditions](./puppeteer.predefinednetworkconditions.md). +# NetworkConditions interface #### Signature: ```typescript -networkConditions: Readonly<{ - 'Slow 3G': NetworkConditions; - 'Fast 3G': NetworkConditions; -}>; +export interface NetworkConditions ``` + +## Properties + +| Property | Modifiers | Type | Description | Default | +| -------- | --------- | ------ | ----------- | ------- | +| download | | number | | | +| latency | | number | | | +| upload | | number | | | diff --git a/packages/puppeteer-core/src/cdp/PredefinedNetworkConditions.ts b/packages/puppeteer-core/src/cdp/PredefinedNetworkConditions.ts index df035ae52b2..2e30f900c32 100644 --- a/packages/puppeteer-core/src/cdp/PredefinedNetworkConditions.ts +++ b/packages/puppeteer-core/src/cdp/PredefinedNetworkConditions.ts @@ -40,10 +40,3 @@ export const PredefinedNetworkConditions = Object.freeze({ latency: 150 * 3.75, } as NetworkConditions, }); - -/** - * @deprecated Import {@link PredefinedNetworkConditions}. - * - * @public - */ -export const networkConditions = PredefinedNetworkConditions;