Update ControllerHandler return type to accept void

This commit is contained in:
Convly 2023-05-26 15:26:36 +02:00
parent f1593c2dde
commit b30a3b426f

View File

@ -3,6 +3,6 @@ import type koa from 'koa';
export type ControllerHandler = <T>( export type ControllerHandler = <T>(
context: koa.ExtendableContext, context: koa.ExtendableContext,
next: koa.Next next: koa.Next
) => Promise<T> | T; ) => Promise<T | void> | T | void;
export type Controller = Record<string, ControllerHandler>; export type Controller = Record<string, ControllerHandler>;