mission.api
Version:
mission api
29 lines (28 loc) • 1.45 kB
TypeScript
/// <reference types="express" />
import 'reflect-metadata';
import { RequestHandler, Router } from '../vendor';
export declare type Method = 'GET' | 'PUT' | 'POST' | 'DELETE' | 'OPTIONS' | 'HEAD' | 'PATCH' | 'TRACE';
export interface ServiceRegister {
NameList: {
[key: string]: Method;
};
Base: string;
GetService: () => any;
}
export declare const ServiceRegistry: {
[key: string]: ServiceRegister;
};
export declare const RoutesRegistry: {
[key: string]: any;
};
export declare function Get(route?: string, pre?: RequestHandler[]): (...args: any[]) => any;
export declare function Put(route?: string, pre?: RequestHandler[]): (...args: any[]) => any;
export declare function Post(route?: string, pre?: RequestHandler[]): (...args: any[]) => any;
export declare function Delete(route?: string, pre?: RequestHandler[]): (...args: any[]) => any;
export declare function Options(route?: string, pre?: RequestHandler[]): (...args: any[]) => any;
export declare function Head(route?: string, pre?: RequestHandler[]): (...args: any[]) => any;
export declare function Patch(route?: string, pre?: RequestHandler[]): (...args: any[]) => any;
export declare function Trace(route?: string, pre?: RequestHandler[]): (...args: any[]) => any;
export declare function Routable(route?: string, method?: Method, pre?: RequestHandler[]): (...args: any[]) => any;
declare const routers: Router;
export { routers as ApplicationRoutes };