Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Type aliases

ApplicationRequestHandler<T>: IRouterHandler<T> & IRouterMatcher<T> & ((...handlers: RequestHandlerParams[]) => T)

Type parameters

  • T

Errback: (err: Error) => void

Type declaration

    • (err: Error): void
    • Parameters

      • err: Error

      Returns void

ErrorRequestHandler<P, ResBody, ReqBody, ReqQuery, Locals>: (err: any, req: Request<P, ResBody, ReqBody, ReqQuery, Locals>, res: Response<ResBody, Locals>, next: NextFunction) => void

Type parameters

Type declaration

GetRouteParameter<S>: RemoveTail<RemoveTail<RemoveTail<S, `/${string}`>, `-${string}`>, `.${string}`>

Type parameters

  • S: string

PathParams: string | RegExp | (string | RegExp)[]
Query: ParsedQs
RemoveTail<S, Tail>: S extends `${infer P}${Tail}` ? P : S

Type parameters

  • S: string

  • Tail: string

RequestHandlerParams<P, ResBody, ReqBody, ReqQuery, Locals>: RequestHandler<P, ResBody, ReqBody, ReqQuery, Locals> | ErrorRequestHandler<P, ResBody, ReqBody, ReqQuery, Locals> | (RequestHandler<P> | ErrorRequestHandler<P>)[]

Type parameters

RequestParamHandler: (req: Request, res: Response, next: NextFunction, value: any, name: string) => any

Type declaration

ResultInvalid: -2
ResultUnsatisfiable: -1
RouteParameters<Route>: string extends Route ? ParamsDictionary : Route extends `${string}(${string}` ? ParamsDictionary : Route extends `${string}:${infer Rest}` ? (GetRouteParameter<Rest> extends never ? ParamsDictionary : GetRouteParameter<Rest> extends `${infer ParamName}?` ? { [ P in ParamName]?: string } : { [ P in GetRouteParameter<Rest>]: string }) & (Rest extends `${GetRouteParameter<Rest>}${infer Next}` ? RouteParameters<Next> : unknown) : {}

Type parameters

  • Route: string

Send<ResBody, T>: (body?: ResBody) => T

Type parameters

Type declaration

    • (body?: ResBody): T
    • Parameters

      • Optional body: ResBody

      Returns T

WebSocketAlias: WebSocket
WebsocketMethod<T>: (route: PathParams, ...middlewares: WebsocketRequestHandler[]) => T

Type parameters

  • T

Type declaration

WebsocketRequestHandler: (ws: ws, req: Request, next: NextFunction) => void

Type declaration

Variables

WebSocketAlias: typeof WebSocket