Interface: RouteDefinition<IncomingEventType, OutgoingResponseType>
Interface: RouteDefinition<IncomingEventType, OutgoingResponseType>
Represents the structure of a route definition.
Extended by
Type Parameters
IncomingEventType
IncomingEventType
extends IIncomingEvent
= IIncomingEvent
OutgoingResponseType
OutgoingResponseType
= unknown
Indexable
[k: string]: unknown
Properties
bindings?
optional bindings: Record<string,
| string
| BindingResolver
| IBoundModel>;
children?
optional children: RouteDefinition<IncomingEventType, OutgoingResponseType>[];
defaults?
optional defaults: Record<string, unknown>;
domain?
optional domain: string | string[];
excludeMiddleware?
optional excludeMiddleware: PipeType<IncomingEventType, OutgoingResponseType>[];
fallback?
optional fallback: boolean;
handler?
optional handler: MixedEventHandler<IncomingEventType, OutgoingResponseType>;
isInternalHeader?
optional isInternalHeader: boolean;
method?
optional method: HttpMethod;
methods?
optional methods: HttpMethod[];
middleware?
optional middleware: MixedPipe<IncomingEventType, OutgoingResponseType>[];
name?
optional name: string;
path
path: string | string[];
protocol?
optional protocol: string | string[];
redirect?
optional redirect:
| string
| Record<string, unknown>
| RouteDefinitionRedirect<IncomingEventType, unknown>;
rules?
optional rules: Record<string, string | RegExp>;
strict?
optional strict: boolean;