@middy/http-router 5.3.4 → 5.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.d.ts +7 -5
  2. package/package.json +4 -4
package/index.d.ts CHANGED
@@ -11,9 +11,7 @@ import {
11
11
 
12
12
  export type Method = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'OPTIONS' | 'HEAD' | 'ANY'
13
13
 
14
- type TResult = ALBResult | APIGatewayProxyResult | APIGatewayProxyResultV2
15
-
16
- export interface Route<TEvent> {
14
+ export interface Route<TEvent, TResult> {
17
15
  method: Method
18
16
  path: string
19
17
  handler: LambdaHandler<TEvent, TResult> | MiddyfiedHandler<TEvent, TResult, any, any>
@@ -23,7 +21,11 @@ declare function httpRouterHandler<
23
21
  TEvent extends
24
22
  | ALBEvent
25
23
  | APIGatewayProxyEvent
26
- | APIGatewayProxyEventV2 = APIGatewayProxyEvent
27
- > (routes: Array<Route<TEvent>>): middy.MiddyfiedHandler
24
+ | APIGatewayProxyEventV2 = APIGatewayProxyEvent,
25
+ TResult extends
26
+ | ALBResult
27
+ | APIGatewayProxyResult
28
+ | APIGatewayProxyResultV2 = APIGatewayProxyResult
29
+ > (routes: Array<Route<TEvent, TResult>>): middy.MiddyfiedHandler<TEvent, TResult>
28
30
 
29
31
  export default httpRouterHandler
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@middy/http-router",
3
- "version": "5.3.4",
3
+ "version": "5.4.0",
4
4
  "description": "HTTP event router for the middy framework",
5
5
  "type": "module",
6
6
  "engines": {
@@ -60,11 +60,11 @@
60
60
  "url": "https://github.com/sponsors/willfarrell"
61
61
  },
62
62
  "dependencies": {
63
- "@middy/util": "5.3.4"
63
+ "@middy/util": "5.4.0"
64
64
  },
65
65
  "devDependencies": {
66
- "@middy/core": "5.3.4",
66
+ "@middy/core": "5.4.0",
67
67
  "@types/aws-lambda": "^8.10.97"
68
68
  },
69
- "gitHead": "37632cf8463e8834c09e91bff14817b7e1e2e8ee"
69
+ "gitHead": "593d40bc87996159c29367ab39d7d415940d9fba"
70
70
  }