express-decorated-router
Version:
Define Express routes using TypeScript decorators
9 lines (8 loc) • 424 B
TypeScript
import { PathParams } from 'express-serve-static-core';
/**
* Use this handler for the given HTTP method. The method must be one understood by Express' router.METHOD() method
* @see https://expressjs.com/en/4x/api.html#router.METHOD
* @param httpMethod The HTTP method
* @param path The path this handler will be responsible for
*/
export declare function Method(httpMethod: string, path: PathParams): MethodDecorator;