We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 46fa4d5 commit 182b224Copy full SHA for 182b224
src/event.ts
@@ -14,9 +14,10 @@ export type CompatibilityEvent = H3Event | IncomingMessage
14
15
interface JSONObject { [x: string]: JSONValue }
16
interface JSONArray extends Array<JSONValue> { }
17
-export type JSONValue = string | number | boolean | JSONObject | JSONArray
+export type JSONValue = undefined | null | string | number | boolean | JSONObject | JSONArray
18
+export type NonNullable<T> = T extends null | undefined ? never : T
19
-type _H3Response = void | JSONValue | Buffer
20
+type _H3Response = void | NonNullable<JSONValue> | Buffer
21
export type H3Response = _H3Response | Promise<_H3Response>
22
23
export interface EventHandler<T extends H3Response = H3Response> {
0 commit comments