import { PlainObject } from '../../common.js'; import { connect } from '../../thirdparty.js'; import { RsdoctorClientRoutes } from '../../client.js'; import { API, APIExtends } from './apis/index.js'; export * as ServerAPI from './apis/index.js'; interface ClientUrlFunctionWithRouteDefined { (route: RsdoctorClientRoutes.BundleDiff, baselineUrl: string, currentUrl: string): T; (route?: 'homepage'): T; } export interface RsdoctorServerInstance { readonly app: connect.Server; readonly port: number; readonly origin: string; innerClientPath?: string; get(route: string, cb: (...args: Parameters) => string | PlainObject): connect.Server; post(route: string, cb: (...args: Parameters) => string | PlainObject): connect.Server; proxy(route: string, method: 'GET' | 'POST', cb: (...args: Parameters) => PlainObject | string): void; getClientUrl: ClientUrlFunctionWithRouteDefined; openClientPage: ClientUrlFunctionWithRouteDefined>; sendAPIDataToClient(api: API | APIExtends, msg: unknown): void | never; broadcast(): void; bootstrap(): Promise; dispose(): Promise; }