File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -121,10 +121,10 @@ export async function writeTypes(nitro: Nitro) {
121121 ) ;
122122 eventHandlerImports . add (
123123 `type ${ eventHandlerType } Output = ${ eventHandlerType } extends EventHandler<any, infer Output> ? Simplify<Serialize<Awaited<Output>>> : unknown`
124- )
124+ ) ;
125125 eventHandlerImports . add (
126126 `type ${ eventHandlerType } Input = ${ eventHandlerType } extends EventHandler<infer Input> ? Input : EventHandlerRequest`
127- )
127+ ) ;
128128
129129 const Output = `${ eventHandlerType } Output` ;
130130 const Input = `${ eventHandlerType } Input` ;
@@ -160,19 +160,21 @@ export async function writeTypes(nitro: Nitro) {
160160 ` <T = ${ Output } >(
161161 url: ${ routeType } ,
162162 options: BaseFetchOptions & { method${
163- isMethodOptional ? "?" : ""
164- } : ${ methodType } } & ${ Input }
163+ isMethodOptional ? "?" : ""
164+ } : ${ methodType } } & ${ Input }
165165 ): true extends Raw ? Promise<FetchResponse<T>> : Promise<T>
166- ${ isMethodOptional
167- ? `
166+ ${
167+ isMethodOptional
168+ ? `
168169 <T = ${ Output } >(
169170 url: IsOptional<${ Input } > extends true ? ${ routeType } : never,
170171 options?: BaseFetchOptions & { method${
171- isMethodOptional ? "?" : ""
172- } : ${ methodType } } & ${ Input }
172+ isMethodOptional ? "?" : ""
173+ } : ${ methodType } } & ${ Input }
173174 ): true extends Raw ? Promise<FetchResponse<T>> : Promise<T>
174175 `
175- : '' } `
176+ : ""
177+ } `,
176178 ] ) ;
177179
178180 const method = mw . method || "default" ;
You can’t perform that action at this time.
0 commit comments