@eggjs/controller-decorator
Version:
tegg controller decorator
17 lines (16 loc) • 1.49 kB
TypeScript
import type { EggProtoImplClass, HTTPMethodEnum, HTTPParamType } from '@eggjs/tegg-types';
export default class HTTPInfoUtil {
static setHTTPPath(path: string, clazz: EggProtoImplClass): void;
static getHTTPPath(clazz: EggProtoImplClass): string | undefined;
static setHTTPMethodPath(path: string, clazz: EggProtoImplClass, methodName: string): void;
static getHTTPMethodPath(clazz: EggProtoImplClass, methodName: string): string | undefined;
static setHTTPMethodMethod(method: HTTPMethodEnum, clazz: EggProtoImplClass, methodName: string): void;
static getHTTPMethodMethod(clazz: EggProtoImplClass, methodName: string): HTTPMethodEnum | undefined;
static setHTTPMethodParamType(paramType: HTTPParamType, parameterIndex: number, clazz: EggProtoImplClass, methodName: string): void;
static getParamIndexList(clazz: EggProtoImplClass, methodName: string): number[];
static getHTTPMethodParamType(parameterIndex: number, clazz: EggProtoImplClass, methodName: string): HTTPParamType | undefined;
static setHTTPMethodParamName(paramName: string, parameterIndex: number, clazz: EggProtoImplClass, methodName: string): void;
static getHTTPMethodParamName(parameterIndex: number, clazz: EggProtoImplClass, methodName: string): string | undefined;
static getHTTPMethodPriority(clazz: EggProtoImplClass, methodName: string): number | undefined;
static setHTTPMethodPriority(priority: number, clazz: EggProtoImplClass, methodName: string): void;
}