refactor!: remove networkConditions in favor of PredefinedNetworkConditions (#11806)

This commit is contained in:
Alex Rudenko 2024-02-02 13:25:20 +01:00 committed by GitHub
parent 84d9a94d62
commit 7564dfa911
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 11 additions and 18 deletions

View File

@ -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) | |

View File

@ -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 | | |

View File

@ -40,10 +40,3 @@ export const PredefinedNetworkConditions = Object.freeze({
latency: 150 * 3.75,
} as NetworkConditions,
});
/**
* @deprecated Import {@link PredefinedNetworkConditions}.
*
* @public
*/
export const networkConditions = PredefinedNetworkConditions;