@@ -127,30 +127,30 @@ export function createFlytrapLogger<T>({
127127 getContext,
128128 addContext,
129129 flush,
130- catchUncaughtAction < T extends ( ...args : any [ ] ) => Promise < any > > (
130+ catchUncaughtAction < T extends ( ...args : unknown [ ] ) => Promise < unknown > > (
131131 fn : T ,
132132 options ?: Partial < z . infer < typeof baseLogSchema > >
133133 ) {
134- // @ts -expect-error
134+ // @ts -expect-error: `addContext` is incompatible due to `T`
135135 return catchUncaughtAction ( fn , addContext , flush , options )
136136 } ,
137137 catchUncaughtRoute < T extends { params : Record < string , unknown > } > (
138138 fn : ( request : Request , context : T ) => Promise < Response > | Response ,
139139 options ?: Partial < z . infer < typeof baseLogSchema > >
140140 ) {
141- // @ts -expect-error
141+ // @ts -expect-error: `addContext` is incompatible due to `T`
142142 return catchUncaughtRoute ( fn , addContext , flush , options )
143143 } ,
144144 response ( body : BodyInit , opts : ResponseInit = { } ) {
145- // @ts -expect-error
145+ // @ts -expect-error: `addContext` is incompatible due to `T`
146146 return response ( body , opts , addContext )
147147 } ,
148- json ( data : any , opts : ResponseInit = { } ) {
149- // @ts -expect-error
148+ json ( data : unknown , opts : ResponseInit = { } ) {
149+ // @ts -expect-error: `addContext` is incompatible due to `T`
150150 return json ( data , opts , addContext )
151151 } ,
152152 redirect ( url : string | URL , status ?: number ) {
153- // @ts -expect-error
153+ // @ts -expect-error: `addContext` is incompatible due to `T`
154154 return redirect ( url , status , addContext )
155155 } ,
156156 }
0 commit comments