File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ import {
2222 fetchNodeRequestHandler ,
2323 callNodeRequestHandler ,
2424 type AbstractRequest ,
25+ type NodeRequestHandler ,
2526} from "node-mock-http" ;
2627import { cachedEventHandler } from "./cache" ;
2728import { useRuntimeConfig } from "./config" ;
@@ -132,15 +133,18 @@ function createNitroApp(): NitroApp {
132133 } ) ;
133134
134135 // Create local fetch caller
135- const nodeHandler = toNodeListener ( h3App ) ;
136+ const nodeHandler = toNodeListener ( h3App ) ; // TODO: Update h3 v1 types
136137 const localCall = ( aRequest : AbstractRequest ) =>
137- callNodeRequestHandler ( nodeHandler , aRequest ) ;
138+ callNodeRequestHandler (
139+ nodeHandler as unknown as NodeRequestHandler ,
140+ aRequest
141+ ) ;
138142 const localFetch : typeof fetch = ( input , init ) => {
139143 if ( ! input . toString ( ) . startsWith ( "/" ) ) {
140144 return globalThis . fetch ( input , init ) ;
141145 }
142146 return fetchNodeRequestHandler (
143- nodeHandler ,
147+ nodeHandler as unknown as NodeRequestHandler ,
144148 input as string /* TODO */ ,
145149 init
146150 ) . then ( ( response ) => normalizeFetchResponse ( response ) ) ;
You can’t perform that action at this time.
0 commit comments