import { ObjectId } from "bson" ; import { BaseWsClient , BaseWsClientOptions , defaultBaseWsClientOptions } from "tsrpc-base-client" ; import { BaseServiceType , ServiceProto } from "tsrpc-proto" ; import { WebSocketProxy } from "./WebSocketProxy" ; typeParam export class WsClient < ServiceType extends BaseServiceType > extends BaseWsClient < ServiceType > { readonly options ! : Readonly < WsClientOptions > ; constructor ( proto , options ? ) { let wsp = new WebSocketProxy ( ) ; super ( proto , wsp , { customObjectIdClass : ObjectId , ... defaultWsClientOptions , ... options } ) ; } } const defaultWsClientOptions = { ... defaultBaseWsClientOptions , } ; export interface WsClientOptions extends BaseWsClientOptions { }