The method the segment after a controller names, `index` when none does, and the class when a variable does.
(cls: Node, segments: readonly string[], at: number, context: ResolutionContext)
| 211 | |
| 212 | /** The method the segment after a controller names, `index` when none does, and the class when a variable does. */ |
| 213 | function handlerIn(cls: Node, segments: readonly string[], at: number, context: ResolutionContext): Node { |
| 214 | const segment = segments[at] ?? 'index'; |
| 215 | return (segment.includes('$') ? null : methodOf(cls, segment, context)) ?? cls; |
| 216 | } |
| 217 | |
| 218 | /** What `controller/method/$1` serves: the first run of segments that names a controller, then the method after it. */ |
| 219 | function routeHandler(root: string, uri: string, context: ResolutionContext): Node | null { |
no test coverage detected