Interface: RouterOptions<IncomingEventType, OutgoingResponseType>
Interface: RouterOptions<IncomingEventType, OutgoingResponseType>
Options for configuring the router.
Extended by
Type Parameters
IncomingEventType
IncomingEventType
extends IIncomingEvent
= IIncomingEvent
OutgoingResponseType
OutgoingResponseType
= unknown
Properties
bindings?
optional bindings: Record<string,
| BindingResolver
| IBoundModel>;
Custom function bindings for specific route behaviors.
defaults?
optional defaults: Record<string, unknown>;
Default parameter values for routes.
definitions
definitions: RouteDefinition<IncomingEventType, OutgoingResponseType>[];
Array of route definitions to be included in the router.
dependencyResolver?
optional dependencyResolver: DependencyResolver;
Resolver used to resolve dependencies.
dispatchers
dispatchers: IDispatchers<IncomingEventType, OutgoingResponseType>;
Dispatchers used for handling callable and controller-based routes.
eventEmitter?
optional eventEmitter: IEventEmitter;
Custom event emitter for handling application events.
matchers
matchers: IMatcher<IncomingEventType, OutgoingResponseType>[];
List of matchers used to validate and match routes.
maxDepth
maxDepth: number;
Maximum depth allowed in route definitions.
middleware?
optional middleware: MixedPipe<IncomingEventType, OutgoingResponseType>[];
List of middleware applied during route resolution.
prefix?
optional prefix: string;
Base path prefix applied to all routes.
rules?
optional rules: Record<string, RegExp>;
Custom rules for route matching, defined as regular expressions.
skipMiddleware?
optional skipMiddleware: boolean;
Skips middleware execution for specific routes.
strict?
optional strict: boolean;
Enables strict path matching.