mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
chore: use a type for protocol (#11394)
This commit is contained in:
parent
7c499cb0b5
commit
8644744dce
@ -27,6 +27,7 @@ import {
|
|||||||
fromEvent,
|
fromEvent,
|
||||||
type Observable,
|
type Observable,
|
||||||
} from '../../third_party/rxjs/rxjs.js';
|
} from '../../third_party/rxjs/rxjs.js';
|
||||||
|
import type {ProtocolType} from '../common/ConnectOptions.js';
|
||||||
import {EventEmitter, type EventType} from '../common/EventEmitter.js';
|
import {EventEmitter, type EventType} from '../common/EventEmitter.js';
|
||||||
import {debugError} from '../common/util.js';
|
import {debugError} from '../common/util.js';
|
||||||
import {timeout} from '../common/util.js';
|
import {timeout} from '../common/util.js';
|
||||||
@ -444,5 +445,5 @@ export abstract class Browser extends EventEmitter<BrowserEvents> {
|
|||||||
/**
|
/**
|
||||||
* @internal
|
* @internal
|
||||||
*/
|
*/
|
||||||
abstract get protocol(): 'cdp' | 'webDriverBiDi';
|
abstract get protocol(): ProtocolType;
|
||||||
}
|
}
|
||||||
|
@ -22,6 +22,11 @@ import type {
|
|||||||
import type {ConnectionTransport} from './ConnectionTransport.js';
|
import type {ConnectionTransport} from './ConnectionTransport.js';
|
||||||
import type {Viewport} from './Viewport.js';
|
import type {Viewport} from './Viewport.js';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @internal
|
||||||
|
*/
|
||||||
|
export type ProtocolType = 'cdp' | 'webDriverBiDi';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generic browser options that can be passed when launching any browser or when
|
* Generic browser options that can be passed when launching any browser or when
|
||||||
* connecting to an existing browser instance.
|
* connecting to an existing browser instance.
|
||||||
@ -54,7 +59,7 @@ export interface BrowserConnectOptions {
|
|||||||
* @defaultValue 'cdp'
|
* @defaultValue 'cdp'
|
||||||
* @internal
|
* @internal
|
||||||
*/
|
*/
|
||||||
protocol?: 'cdp' | 'webDriverBiDi';
|
protocol?: ProtocolType;
|
||||||
/**
|
/**
|
||||||
* Timeout setting for individual protocol (CDP) calls.
|
* Timeout setting for individual protocol (CDP) calls.
|
||||||
*
|
*
|
||||||
|
Loading…
Reference in New Issue
Block a user