error TS2322: Type '(c: Context<RequestBody, PathParameters, any, any, any, Document>, req: Request<ParamsDictionary, any, any, ParsedQs, Record<...>>, res: Response<...>) => Promise<...>' is not assignable to type 'OperationHandler<"reconfigureRepo">'.
Types of parameters 'req' and 'params' are incompatible.
Type 'unknown' is not assignable to type 'Request<ParamsDictionary, any, any, ParsedQs, Record<string, any>>'.
export type OperationHandler<operationId extends keyof Operations> = (
c: OperationContext<operationId>,
req: ExpressRequest,
res: ExpressResponse,
) => Promise<OperationHandlerResponse<operationId>>;
The documented pattern for 'Typesafe Operation Handlers' doesn't seem to work (anymore?), as it produces the following error:
To work around this I have just defined my own
OperationHandlertype as follows: