Skip to content
This repository was archived by the owner on Jul 6, 2025. It is now read-only.

Commit 94a0bd8

Browse files
committed
Update types
1 parent 7c841ce commit 94a0bd8

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

types.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,11 +191,18 @@ export type ServerOptions = {
191191
compress?: boolean
192192
}
193193

194+
/**
195+
* The handler for API requests.
196+
*/
197+
export type APIHandler = {
198+
(context: APIContext): Promise<void> | void
199+
}
200+
194201
/**
195202
* The middleware for API requests.
196203
*/
197204
export type APIMiddleware = {
198-
(context: APIContext, next: () => void): Promise<void>
205+
(context: APIContext, next: () => void): Promise<void> | void
199206
}
200207

201208
/**

0 commit comments

Comments
 (0)