File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,13 +12,13 @@ export interface H3Event {
1212
1313export type CompatibilityEvent = H3Event | IncomingMessage
1414
15- interface JSONObject { [ x : string ] : JSONValue }
16- interface JSONArray extends Array < JSONValue > { }
17- export type JSONValue = undefined | null | string | number | boolean | JSONObject | JSONArray
18- export type NonNullable < T > = T extends null | undefined ? never : T
19-
20- type _H3Response = void | NonNullable < JSONValue > | Buffer
21- export type H3Response = _H3Response | Promise < _H3Response >
15+ // interface JSONObject { [x: string]: JSONValue }
16+ // interface JSONArray extends Array<JSONValue> { }
17+ // type JSONValue = undefined | null | string | number | boolean | JSONObject | JSONArray
18+ // type NonNullable<T> = T extends null | undefined ? never : T
19+ // TODO: Find a more reliable way to typecheck Response with complex intefaces
20+ // https://github.com/unjs/h3/issues/112
21+ export type H3Response = any
2222
2323export interface EventHandler < T extends H3Response = H3Response > {
2424 '__is_handler__' ?: true
You can’t perform that action at this time.
0 commit comments