Skip to content

Commit

Permalink
fix(types): allow EventHandler type for dev handlers
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed Sep 5, 2022
1 parent 3bd48e3 commit b0a3f43
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/types/handler.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Handler, CompatibilityEvent, H3Error } from 'h3'
import type { Handler, EventHandler, CompatibilityEvent, H3Error } from 'h3'

export interface NitroEventHandler {
/**
Expand Down Expand Up @@ -41,7 +41,7 @@ export interface NitroDevEventHandler {
* Event handler
*
*/
handler: Handler
handler: Handler | EventHandler
}

export type NitroErrorHandler = (error: H3Error, event: CompatibilityEvent) => void | Promise<void>

0 comments on commit b0a3f43

Please sign in to comment.