Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "node_modules/compose-middleware/lib/index.d"

Index

Type aliases

ErrorHandler

ErrorHandler<T, U, V>: function

Type parameters

  • T

  • U

  • V

Type declaration

    • (err: Error, req: T, res: U, next: Next<V>): V
    • Parameters

      • err: Error
      • req: T
      • res: U
      • next: Next<V>

      Returns V

Handler

Handler<T, U, V>: Middleware<T, U, V> | NestedArray<Middleware<T, U, V>>

Type parameters

  • T

  • U

  • V

Middleware

Middleware<T, U, V>: RequestHandler<T, U, V> | ErrorHandler<T, U, V>

Type parameters

  • T

  • U

  • V

Next

Next<T>: function

Type parameters

  • T

Type declaration

    • (err?: Error | null): T
    • Parameters

      • Optional err: Error | null

      Returns T

RequestHandler

RequestHandler<T, U, V>: function

Type parameters

  • T

  • U

  • V

Type declaration

    • (req: T, res: U, next: Next<V>): V
    • Parameters

      • req: T
      • res: U
      • next: Next<V>

      Returns V

Functions

compose

  • Compose an array of middleware handlers into a single handler.

    Type parameters

    • T

    • U

    • V

    Parameters

    • Rest ...handlers: Handler<T, U, V>[]

    Returns RequestHandler<T, U, V>

errors

  • Wrap middleware handlers.

    Type parameters

    • T

    • U

    • V

    Parameters

    • Rest ...handlers: Handler<T, U, V>[]

    Returns ErrorHandler<T, U, V>

Generated using TypeDoc