import { RequestMethods } from '../Server' ; import { RouteInterface } from './RouteInterface' ; import { AbstractActionController } from '../Controller' ; export class Route { public static method ( method , route , controller , action ) { return { method , route , action , controller : controller as typeof AbstractActionController } ; } public static get ( route , controller , action ) { return Route . method ( RequestMethods . Get , route , controller , action ) ; } public static post ( route , controller , action ) { return Route . method ( RequestMethods . Post , route , controller , action ) ; } public static put ( route , controller , action ) { return Route . method ( RequestMethods . Put , route , controller , action ) ; } public static patch ( route , controller , action ) { return Route . method ( RequestMethods . Patch , route , controller , action ) ; } public static delete ( route , controller , action ) { return Route . method ( RequestMethods . Delete , route , controller , action ) ; } }