Fixing types

This commit is contained in:
Sahil Ahuja 2025-03-03 15:42:34 +05:30
parent 0ed6aa1276
commit 16f8a4f21f
2 changed files with 4 additions and 2 deletions

View File

@ -40,6 +40,8 @@
"@gmetrixr/gdash": "1.*.*" "@gmetrixr/gdash": "1.*.*"
}, },
"dependencies": { "dependencies": {
"@types/superagent": "^8.1.9",
"@types/superagent-prefix": "^0.0.6",
"superagent": "^10.1.1", "superagent": "^10.1.1",
"superagent-prefix": "^0.0.2" "superagent-prefix": "^0.0.2"
}, },

View File

@ -1,4 +1,4 @@
import request, { SuperAgent } from "superagent"; import request, { Agent } from "superagent";
import prefix from "superagent-prefix"; import prefix from "superagent-prefix";
export function customErrorHandler(err: Error): request.Response { export function customErrorHandler(err: Error): request.Response {
@ -12,7 +12,7 @@ export abstract class BaseCaller {
* Makes the request after prefixing the apiUrl to the request path * Makes the request after prefixing the apiUrl to the request path
* https://visionmedia.github.io/superagent/#get-requests * https://visionmedia.github.io/superagent/#get-requests
*/ */
protected agent: SuperAgent<request.SuperAgentRequest> & request.Request; protected agent: Agent;
/** /**
* base API url * base API url
*/ */