Skip to main content

MiddlewareDeclaration

Overview

MiddlewareDeclaration<PathPatternPrefix>: readonly [`PathPatternPrefix`, [`Fetcher<any>`](../interfaces/Fetcher.mdx)]

Middleware declaration in the convenient shape of Map's constructor parameters.

Type parameters

NameTypeDescription
PathPatternPrefixextends string = stringA path prefix defining where the middleware should be mounted. Combines with the given router's routes.

Defined in

router/types/MiddlewareDeclaration.ts:23