Type alias RequestHandler<TMeans>

RequestHandler<TMeans>: ((this, context) => PromiseLike<unknown> | void)

Type Parameters

  • TMeans

    A type of request processing means this handler expects.

Type declaration

    • (this, context): PromiseLike<unknown> | void
    • Request processing handler signature.

      Handler implementations expect a request processing context containing specific processing means. E.g. the ones for HTTP request processing. The handler may either respond using the provided means, or delegate to next handler.

      The handler may be asynchronous.

      Parameters

      • this: void
      • context: RequestContext<TMeans>

        Request processing context containing the necessary means.

      Returns PromiseLike<unknown> | void

      Either nothing if the handler completed its work synchronously, or a promise-like instance resolved when the handler completed its work asynchronously.

Generated using TypeDoc