diff --git a/types/index.d.ts b/types/index.d.ts index 4fd08c5..45fb206 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -76,7 +76,7 @@ export interface Context { export type ResponseInterceptor = (response: Response, options: RequestOptionsInit) => Response | Promise; -export type OnionMiddleware = (ctx: Context, next: () => void) => void; +export type OnionMiddleware = (ctx: Context, next: () => Promise) => void; export type OnionOptions = { global?: boolean; core?: boolean; defaultInstance?: boolean }; export interface RequestMethod {