Class: RouteDefinition
A class representing the definition of an HTTP route.
Constructors
Constructor
new RouteDefinition(
target,propertyKey,httpMethod,path,versions,hosts,handler,candidates?):RouteDefinition
Parameters
target
propertyKey
string | symbol
httpMethod
path
string
versions
string[]
hosts
string[]
handler
candidates?
readonly RouteDefinition[]
Returns
RouteDefinition
Properties
candidates
readonlycandidates: readonlyRouteDefinition[]
The declared routes served by this definition. A grouped dispatch route lists every route it groups; any other route lists itself.
handler
readonlyhandler:RouteHandler
hosts
readonlyhosts:string[]
httpMethod
readonlyhttpMethod:HttpMethod
path
readonlypath:string
propertyKey
readonlypropertyKey:string|symbol
target
readonlytarget:ClassType
versions
readonlyversions:string[]
Methods
compare()
compare(
other):RouteConflict[]
Compares this route with another route and reports any compatibility issues.
Parameters
other
RouteDefinition