The type of incoming HTTP events.
The type of outgoing HTTP responses.
Constructs a RouteCollection instance.
The type of incoming HTTP events.
The type of outgoing HTTP responses.
Optionalroutes: Route<IncomingEventType, OutgoingResponseType>[]
Optional array of Route instances to initialize the collection.
Retrieves the total number of routes in the collection.
Implements the iterable protocol for iterating over routes.
An iterator for the routes.
Adds a Route to the collection.
The Route to add.
The updated RouteCollection instance.
Dumps all routes as an array of JSON objects.
An array of route definitions.
Retrieves a route by name.
The name of the route.
The corresponding Route, or undefined if not found.
Retrieves all registered routes as an array.
An array of all routes.
Retrieves all routes for a given HTTP method.
The HTTP method.
An array of matching routes.
Checks if a named route exists.
The name of the route.
true if the named route exists, false otherwise.
Matches a Route based on an incoming event.
The incoming HTTP event.
Whether to consider the HTTP method during matching. Defaults to true.
The matched Route.
Converts all routes to a JSON string.
A JSON string representing all routes.
StaticcreateFactory method to create a RouteCollection instance.
Optionalroutes: Route<IncomingEventType, OutgoingResponseType>[]
Optional array of Route instances to initialize the collection.
A new RouteCollection instance.
Manages a collection of
Routeinstances.