diff --git a/src/server/base/BaseServer.ts b/src/server/base/BaseServer.ts index c6f9be3..5e13243 100644 --- a/src/server/base/BaseServer.ts +++ b/src/server/base/BaseServer.ts @@ -1,6 +1,7 @@ import chalk from "chalk"; import * as path from "path"; import { TSBuffer } from 'tsbuffer'; +import { CustomTypeSchema } from "tsbuffer-schema"; import { Counter, Flow, getCustomObjectIdTypes, MsgHandlerManager, MsgService, ParsedServerInput, ServiceMap, ServiceMapUtil, TransportDataUtil } from 'tsrpc-base-client'; import { ApiReturn, ApiServiceDef, BaseServiceType, Logger, LogLevel, ServerInputData, ServiceProto, setLogLevel, TsrpcError, TsrpcErrorType } from 'tsrpc-proto'; import { getClassObjectId } from "../../models/getClassObjectId"; @@ -170,7 +171,8 @@ export abstract class BaseServer { * If `NODE_ENV` equals to `production`, the default value is `false`, otherwise is `true`. */ returnInnerError: boolean; + + /** + * Customize the protocol data type + */ + customTypes?: { [schemaId: string]: CustomTypeSchema } } export const defaultBaseServerOptions: BaseServerOptions = {