import { MsgService } from "tsrpc-base-client" ; import { BaseServiceType } from "tsrpc-proto" ; import { PrefixLogger } from "../models/PrefixLogger" ; import { BaseCall , BaseCallOptions } from "./BaseCall" ; export interface MsgCallOptions < Msg , ServiceType extends BaseServiceType > extends BaseCallOptions < ServiceType > { service : MsgService ; msg : Msg ; } typeParam typeParam export abstract class MsgCall < Msg = any , ServiceType extends BaseServiceType = any > extends BaseCall < ServiceType > { readonly type = 'msg' as const ; readonly service ! : MsgService ; readonly msg : Msg ; constructor ( options , logger ? ) { super ( options , logger ?? new PrefixLogger ( { logger : options . conn . logger , prefixs : [ `[Msg:${ options . service . name }]` ] } ) ) ; this . msg = options . msg ; } }