import { handlerFunc } from "./types" ; export class Group { middleware : handlerFunc [ ] = [ ] ; routes : Record < string , handlerFunc [ ] > = { } ; constructor ( public base ) { } path ( path , ... handlers ) { this . routes [ path ] = handlers ; } use ( handler ) { this . middleware . push ( handler ) ; } }