Skip to content

Workery / routing / RouteMatcher

Class: RouteMatcher<E>

routing.RouteMatcher

Type parameters

NameType
Eunknown

Table of contents

Constructors

Properties

Accessors

Methods

Constructors

constructor

new RouteMatcher<E>(): RouteMatcher<E>

Type parameters

NameType
Eunknown

Returns

RouteMatcher<E>

Defined in

src/routing.ts:200

Properties

routes

routes: Route<any, any, E>[]

Defined in

src/routing.ts:197

Accessors

length

get length(): number

Returns

number

Defined in

src/routing.ts:211

Methods

[iterator]

[iterator](): IterableIterator<Route<any, any, E>>

Returns

IterableIterator<Route<any, any, E>>

Defined in

src/routing.ts:205


push

push(...routes): number

Parameters

NameType
...routesRoute<any, any, E>[]

Returns

number

Defined in

src/routing.ts:215


match

match(method, path): [undefined | null | Route<any, any, E>, Record<string, string>]

Parameters

NameType
methodstring
pathstring

Returns

[undefined | null | Route<any, any, E>, Record<string, string>]

Defined in

src/routing.ts:236