Skip to content

Instantly share code, notes, and snippets.

@medfreeman
Created October 23, 2019 21:11
Show Gist options
  • Save medfreeman/4d92bd6c995d56722b537e6ce3222156 to your computer and use it in GitHub Desktop.
Save medfreeman/4d92bd6c995d56722b537e6ce3222156 to your computer and use it in GitHub Desktop.
diff --git a/node_modules/@types/koa-compose/index.d.ts b/node_modules/@types/koa-compose/index.d.ts
index 3658a8f..c216d3a 100644
--- a/node_modules/@types/koa-compose/index.d.ts
+++ b/node_modules/@types/koa-compose/index.d.ts
@@ -50,7 +50,7 @@ declare function compose<T1, U1, T2, U2, T3, U3, T4, U4, T5, U5, T6, U6, T7, U7,
declare function compose<T>(middleware: Array<compose.Middleware<T>>): compose.ComposedMiddleware<T>;
declare namespace compose {
- type Middleware<T> = (context: T, next: () => Promise<any>) => any;
+ type Middleware<T, U = any> = (this: U, context: T, next: () => Promise<any>) => any;
type ComposedMiddleware<T> = (context: T, next?: () => Promise<any>) => Promise<void>;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment