(method: HTTPMethod, pattern: string, handler: RouteHandler)
| 32 | } |
| 33 | |
| 34 | register(method: HTTPMethod, pattern: string, handler: RouteHandler): void { |
| 35 | const { regex, paramNames } = this.compilePattern(pattern); |
| 36 | this.routes.push({ |
| 37 | method, |
| 38 | pattern, |
| 39 | handler, |
| 40 | regex, |
| 41 | paramNames, |
| 42 | }); |
| 43 | } |
| 44 | |
| 45 | get(pattern: string, handler: RouteHandler): void { |
| 46 | this.register("GET", pattern, handler); |
no test coverage detected