UNPKG

@eggjs/controller-decorator

Version:

tegg controller decorator

21 lines (20 loc) 1.2 kB
import type { ControllerMetadata, EggPrototypeName, MiddlewareFunc } from '@eggjs/tegg-types'; import { ControllerType } from '@eggjs/tegg-types'; import { WebSocketMethodMeta } from './WebSocketMethodMeta'; export declare class WebSocketControllerMeta implements ControllerMetadata { readonly protoName: EggPrototypeName; readonly controllerName: string; readonly className: string; readonly type = ControllerType.WEBSOCKET; readonly path?: string; readonly middlewares: readonly MiddlewareFunc[]; readonly methods: readonly WebSocketMethodMeta[]; readonly hosts?: string[]; readonly timeout?: number; constructor(className: string, protoName: EggPrototypeName, controllerName: string, path: string | undefined, middlewares: MiddlewareFunc[], methods: WebSocketMethodMeta[], hosts: string[] | undefined, timeout?: number); getMethodRealPath(method: WebSocketMethodMeta): string; getMethodHosts(method: WebSocketMethodMeta): string[] | undefined; getMethodName(method: WebSocketMethodMeta): string; getMethodMiddlewares(method: WebSocketMethodMeta): MiddlewareFunc[]; getMethodTimeout(method: WebSocketMethodMeta): number | undefined; }