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