Rush StackShopBlogEvents
Skip to main content

Home > @rushstack/playwright-browser-tunnel > IPlaywrightTunnelOptions

IPlaywrightTunnelOptions type

This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Options for configuring a PlaywrightTunnel instance.

Signature:

export type IPlaywrightTunnelOptions = {
terminal: ITerminal;
onStatusChange: (status: TunnelStatus) => void;
playwrightInstallPath: string;
onBeforeLaunch?: (handshake: IHandshake) => Promise<boolean> | boolean;
} & ({
mode: 'poll-connection';
wsEndpoint: string;
} | {
mode: 'wait-for-incoming-connection';
listenPort: number;
});

References: ITerminal, TunnelStatus, IHandshake