I have a class that standardizes API responses. It has a number of member methods, like ResponseNotFound. I currently use a middleware to attach an instance of this class to req.apiResponse. However, the interface Express.Response doesn't have the property apiResponse.
When the type is basic, such as string or () => void I have no problem modifying the Express types. But, in this case, I can't find a way to get the ApiResponse class into my vendor.d.ts file. If I import into my .d.ts file my declarations are no longer ambient. Is there a way to get the ApiResponse class typings into the vendor.d.ts file?
If not, what are my options?