@huolala-tech/page-spy-lynx
Version:
An SDK of PageSpy for debugging Lynx app
20 lines (19 loc) • 709 B
TypeScript
import type { Client } from '@huolala-tech/page-spy-types';
import { Config } from '../config';
/** PageSpy 后端 API 封装,负责创建调试房间和拼接房间 WebSocket 地址。 */
export default class Request {
config: Config;
client: Client;
constructor(config: Config, client: Client);
get base(): string;
/** 当前实例使用的 HTTP/WS 协议头。 */
getScheme(): string[];
/** 创建调试房间并返回房间名、房间号和 WebSocket 地址。 */
createRoom(): Promise<{
roomUrl: string;
address: string;
name: string;
}>;
/** 拼接客户端加入房间的 WebSocket URL。 */
getRoomUrl(address: string): string;
}