Snippet:
import * as request from 'superagent';
request
.get('https://***.execute-api.eu-west-1.amazonaws.com/dev/')
.proxy(this.options.proxy)
Error in TypeScript:
Property 'proxy' is not found on type 'SuperAgentRequest'
Type annotations for the 'request' module:
(alias) namespace request
(alias) const request: request.SuperAgentStatic
import request
My attempt at creating type definitions (which did not resolve the TypeScript error):
declare module superagent {
interface SuperAgentRequest {
proxy: any;
}
}
What mistake could be present in my declaration file?