@types/koa-compose

  • Version 3.2.8
  • Published
  • 7.73 kB
  • 1 dependency
  • MIT license

Install

npm i @types/koa-compose
yarn add @types/koa-compose
pnpm add @types/koa-compose

Overview

TypeScript definitions for koa-compose

Index

Functions

function compose

compose: {
<T1, U1, T2, U2>(
middleware: [Koa.Middleware<T1, U1>, Koa.Middleware<T2, U2>]
): Koa.Middleware<T1 & T2, U1 & U2>;
<T1, U1, T2, U2, T3, U3>(
middleware: [
Koa.Middleware<T1, U1>,
Koa.Middleware<T2, U2>,
Koa.Middleware<T3, U3>
]
): Koa.Middleware<T1 & T2 & T3, U1 & U2 & U3>;
<T1, U1, T2, U2, T3, U3, T4, U4>(
middleware: [
Koa.Middleware<T1, U1>,
Koa.Middleware<T2, U2>,
Koa.Middleware<T3, U3>,
Koa.Middleware<T4, U4>
]
): Koa.Middleware<T1 & T2 & T3 & T4, U1 & U2 & U3 & U4>;
<T1, U1, T2, U2, T3, U3, T4, U4, T5, U5>(
middleware: [
Koa.Middleware<T1, U1>,
Koa.Middleware<T2, U2>,
Koa.Middleware<T3, U3>,
Koa.Middleware<T4, U4>,
Koa.Middleware<T5, U5>
]
): Koa.Middleware<T1 & T2 & T3 & T4 & T5, U1 & U2 & U3 & U4 & U5>;
<T1, U1, T2, U2, T3, U3, T4, U4, T5, U5, T6, U6>(
middleware: [
Koa.Middleware<T1, U1>,
Koa.Middleware<T2, U2>,
Koa.Middleware<T3, U3>,
Koa.Middleware<T4, U4>,
Koa.Middleware<T5, U5>,
Koa.Middleware<T6, U6>
]
): Koa.Middleware<T1 & T2 & T3 & T4 & T5 & T6, U1 & U2 & U3 & U4 & U5 & U6>;
<T1, U1, T2, U2, T3, U3, T4, U4, T5, U5, T6, U6, T7, U7>(
middleware: [
Koa.Middleware<T1, U1>,
Koa.Middleware<T2, U2>,
Koa.Middleware<T3, U3>,
Koa.Middleware<T4, U4>,
Koa.Middleware<T5, U5>,
Koa.Middleware<T6, U6>,
Koa.Middleware<T7, U7>
]
): Koa.Middleware<
T1 & T2 & T3 & T4 & T5 & T6 & T7,
U1 & U2 & U3 & U4 & U5 & U6 & U7
>;
<T1, U1, T2, U2, T3, U3, T4, U4, T5, U5, T6, U6, T7, U7, T8, U8>(
middleware: [
Koa.Middleware<T1, U1>,
Koa.Middleware<T2, U2>,
Koa.Middleware<T3, U3>,
Koa.Middleware<T4, U4>,
Koa.Middleware<T5, U5>,
Koa.Middleware<T6, U6>,
Koa.Middleware<T7, U7>,
Koa.Middleware<T8, U8>
]
): Koa.Middleware<
T1 & T2 & T3 & T4 & T5 & T6 & T7 & T8,
U1 & U2 & U3 & U4 & U5 & U6 & U7 & U8
>;
<T>(middleware: compose.Middleware<T>[]): compose.ComposedMiddleware<T>;
};

    Type Aliases

    type ComposedMiddleware

    type ComposedMiddleware<T> = (context: T, next?: Koa.Next) => Promise<void>;

      type Middleware

      type Middleware<T> = (context: T, next: Koa.Next) => any;

        Package Files (1)

        Dependencies (1)

        Dev Dependencies (0)

        No dev dependencies.

        Peer Dependencies (0)

        No peer dependencies.

        Badge

        To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

        You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@types/koa-compose.

        • Markdown
          [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/@types/koa-compose)
        • HTML
          <a href="https://www.jsdocs.io/package/@types/koa-compose"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>