Skip to content

Commit 84090e7

Browse files
committed
Reverted the return type of the next function
1 parent ddf1d2f commit 84090e7

File tree

1 file changed

+3
-5
lines changed
  • packages/event-handler/src/types

1 file changed

+3
-5
lines changed

packages/event-handler/src/types/rest.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,16 +79,14 @@ type RestRouteOptions = {
7979
middleware?: Middleware[];
8080
};
8181

82-
type NextFunction = () => // biome-ignore lint/suspicious/noConfusingVoidType: To ensure next function is awaited
83-
| Promise<HandlerResponse | void>
84-
| HandlerResponse
85-
| void;
82+
// biome-ignore lint/suspicious/noConfusingVoidType: To ensure next function is awaited
83+
type NextFunction = () => Promise<HandlerResponse | void>;
8684

8785
type Middleware = (args: {
8886
reqCtx: RequestContext;
8987
next: NextFunction;
9088
// biome-ignore lint/suspicious/noConfusingVoidType: To ensure next function is awaited
91-
}) => Promise<HandlerResponse | void> | HandlerResponse | void;
89+
}) => Promise<HandlerResponse | void>;
9290

9391
type RouteRegistryOptions = {
9492
/**

0 commit comments

Comments
 (0)