File tree Expand file tree Collapse file tree 2 files changed +6
-9
lines changed
packages/event-handler/src Expand file tree Collapse file tree 2 files changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -190,7 +190,7 @@ class AppSyncGraphQLResolver extends Router {
190
190
* @param options - Optional resolve options for customizing resolver behavior.
191
191
*/
192
192
async #withErrorHandling(
193
- fn : ( ) => Promise < unknown > | unknown ,
193
+ fn : ( ) => unknown ,
194
194
event : AppSyncResolverEvent < Record < string , unknown > > ,
195
195
options ?: ResolveOptions
196
196
) {
@@ -377,7 +377,7 @@ class AppSyncGraphQLResolver extends Router {
377
377
event : AppSyncResolverEvent < Record < string , unknown > > ,
378
378
context : Context ,
379
379
options ?: ResolveOptions
380
- ) : Promise < unknown > | unknown {
380
+ ) : unknown {
381
381
const { fieldName, parentTypeName : typeName } = event . info ;
382
382
383
383
const resolverHandlerOptions = this . resolverRegistry . resolve (
Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ interface CompiledRoute {
54
54
55
55
type DynamicRoute = Route & CompiledRoute ;
56
56
57
- type HandlerResponse = Response | JSONObject | undefined ;
57
+ type HandlerResponse = Response | JSONObject ;
58
58
59
59
type RouteHandler < TReturn = HandlerResponse > = (
60
60
reqCtx : RequestContext
@@ -79,16 +79,13 @@ type RestRouteOptions = {
79
79
middleware ?: Middleware [ ] ;
80
80
} ;
81
81
82
- type NextFunction = ( ) =>
83
- | Promise < HandlerResponse >
84
- | HandlerResponse
85
- | Promise < void >
86
- | void ;
82
+ type NextFunction = ( ) => Promise < HandlerResponse | void > ; // biome-ignore lint/suspicious/noConfusingVoidType: To ensure next function is awaited
87
83
88
84
type Middleware = ( args : {
89
85
reqCtx : RequestContext ;
90
86
next : NextFunction ;
91
- } ) => NextFunction ;
87
+ // biome-ignore lint/suspicious/noConfusingVoidType: To ensure next function is awaited
88
+ } ) => Promise < HandlerResponse | void > ;
92
89
93
90
type RouteRegistryOptions = {
94
91
/**
You can’t perform that action at this time.
0 commit comments