@eggjs/controller-decorator
Version:
tegg controller decorator
21 lines (20 loc) • 2.02 kB
TypeScript
import { WebSocketParamType, type EggProtoImplClass, type WebSocketFetchMethodType } from '@eggjs/tegg-types';
export default class WebSocketInfoUtil {
static setWebSocketPath(path: string, clazz: EggProtoImplClass): void;
static getWebSocketPath(clazz: EggProtoImplClass): string | undefined;
static setWebSocketMethodPath(path: string, clazz: EggProtoImplClass, methodName: string): void;
static getWebSocketMethodPath(clazz: EggProtoImplClass, methodName: string): string | undefined;
static setWebSocketMethodParamType(paramType: WebSocketParamType, parameterIndex: number, clazz: EggProtoImplClass, methodName: string): void;
static getParamIndexList(clazz: EggProtoImplClass, methodName: string): number[];
static getCompatibleParamIndexList(clazz: EggProtoImplClass, methodName: string): number[];
static getWebSocketMethodParamType(parameterIndex: number, clazz: EggProtoImplClass, methodName: string): WebSocketParamType | undefined;
static getCompatibleMethodParamType(parameterIndex: number, clazz: EggProtoImplClass, methodName: string): WebSocketParamType | undefined;
static setWebSocketMethodParamName(paramName: string, parameterIndex: number, clazz: EggProtoImplClass, methodName: string): void;
static getWebSocketMethodParamName(parameterIndex: number, clazz: EggProtoImplClass, methodName: string): string | undefined;
static getCompatibleMethodParamName(parameterIndex: number, clazz: EggProtoImplClass, methodName: string): string | undefined;
static getWebSocketMethodPriority(clazz: EggProtoImplClass, methodName: string): number | undefined;
static setWebSocketMethodPriority(priority: number, clazz: EggProtoImplClass, methodName: string): void;
static setWebSocketFetchMethodType(type: WebSocketFetchMethodType, clazz: EggProtoImplClass, methodName: string): void;
static getWebSocketFetchMethodType(clazz: EggProtoImplClass, methodName: string): WebSocketFetchMethodType | undefined;
private static fromHTTPParamType;
}