File tree Expand file tree Collapse file tree 2 files changed +12
-8
lines changed Expand file tree Collapse file tree 2 files changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -17,9 +17,11 @@ export default async function edgeFunctionHandler(
1717 throw new Error ( `No route found for ${ request . url } ` ) ;
1818 }
1919
20- const result = await self . _ENTRIES [
20+ const entry = await self . _ENTRIES [
2121 `middleware_${ correspondingRoute . name } `
22- ] . default ( {
22+ ] ;
23+
24+ const result = await entry . default ( {
2325 page : correspondingRoute . page ,
2426 request : {
2527 ...request ,
Original file line number Diff line number Diff line change @@ -37,13 +37,15 @@ export interface RequestData {
3737 signal : AbortSignal ;
3838}
3939
40+ interface Entry {
41+ default : ( props : { page : string ; request : RequestData } ) => Promise < {
42+ response : Response ;
43+ waitUntil : Promise < void > ;
44+ } > ;
45+ }
46+
4047interface Entries {
41- [ k : string ] : {
42- default : ( props : { page : string ; request : RequestData } ) => Promise < {
43- response : Response ;
44- waitUntil : Promise < void > ;
45- } > ;
46- } ;
48+ [ k : string ] : Entry | Promise < Entry > ;
4749}
4850
4951export interface EdgeRoute {
You can’t perform that action at this time.
0 commit comments