import { APIRoute } from "./route"; import { Service } from "./service"; export interface RouteDecorator { (this: TThis, obj: any, name: string, descriptor: TypedPropertyDescriptor>): void; } export interface RouteInterface { (this: TThis, context: TThis, ...args: any[]): void; } export interface RouteDecoratorFactory { (option: TOption): RouteDecorator; } export declare namespace RouteDecoratorFactory { function from(guard: GuardFunction): RouteDecoratorFactory; } export interface GuardFunction { (this: TThis, context: TThis, option: TOption, pass: () => void): void; } export interface FakeService extends Service { services: TServices; } export declare class RouteDecorators { spec: TSpecs; constructor(spec: TSpecs); private decs; implement(name: K, guard: GuardFunction> & TSpecs[K], TSpecs[K]["option"]>): void; decorate(name: K, option?: TSpecs[K]["option"]): RouteDecorator; } export declare abstract class RouteDecoratorSpec { params?: any; services?: any; option?: any; return?: any; } export interface RouteDecoratorSpecs { [name: string]: RouteDecoratorSpec; }