import { HttpMethod } from './HttpMethod'; interface Route { method: HttpMethod; path: string; handler: any; middlewares: any[]; } class RouteBuilder { private _route: Route; constructor() { this._route = { method: HttpMethod.GET, path: '', handler: null, middlewares: [], }; } public setMethod(method: HttpMethod) { this._route.method = method; return this; } public setPath(path: string) { this._route.path = path; return this; } public setHandler(handler: any) { this._route.handler = handler; return this; } public setMiddlewares(middlewares: any[]) { this._route.middlewares = middlewares; return this; } public build() { return this._route; } } export { RouteBuilder, Route };