Skip to content

Commit

Permalink
fix: added missing patch router method (#166)
Browse files Browse the repository at this point in the history
  • Loading branch information
Shahriar-Rahi committed Aug 23, 2022
1 parent b95ab25 commit dff2211
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { eventHandler, EventHandler, toEventHandler } from './event'
import type { CompatibilityEventHandler } from './event'

export type RouterMethod = Lowercase<HTTPMethod>
const RouterMethods: RouterMethod[] = ['connect', 'delete', 'get', 'head', 'options', 'post', 'put', 'trace']
const RouterMethods: RouterMethod[] = ['connect', 'delete', 'get', 'head', 'options', 'post', 'put', 'trace', 'patch']

export type RouterUse = (path: string, handler: CompatibilityEventHandler, method?: RouterMethod | RouterMethod[]) => Router
export type AddRouteShortcuts = Record<RouterMethod, RouterUse>
Expand Down

0 comments on commit dff2211

Please sign in to comment.