In file `index.d.ts`: https://github.com/nodefluent/kafka-connect/blob/73d7b50368f86168e1c99b922f5b7f3b0af25aca/index.d.ts#L146 I think the a correct type definition for the `middlewares` field should be: `middlewares: ((req, res, next) => void)[];`