refactor(server): various type errors

This commit is contained in:
Elian Doran 2025-05-21 15:42:53 +03:00
parent 6414dd71ab
commit de83029c3a
No known key found for this signature in database
3 changed files with 3 additions and 3 deletions

View File

@ -6,7 +6,7 @@ import etapiTokenService from "../services/etapi_tokens.js";
import config from "../services/config.js";
import type { NextFunction, Request, RequestHandler, Response, Router } from "express";
import type { ValidatorMap } from "./etapi-interface.js";
import type { ApiRequestHandler } from "../routes/routes.js";
import type { ApiRequestHandler } from "../routes/route_api.js";
const GENERIC_CODE = "GENERIC";
type HttpMethod = "all" | "get" | "post" | "put" | "delete" | "patch" | "options" | "head";

View File

@ -50,7 +50,7 @@ function init(app: Express.Application) {
}
};
return app._router.handle(req, res, () => {});
return (app as any)._router.handle(req, res, () => {});
});
}

View File

@ -207,7 +207,7 @@ async function getClient(opts: ClientOpts): Promise<Client> {
// it's not clear how to explicitly configure proxy (as opposed to system proxy),
// so in that case, we always use node's modules
if (isElectron && !opts.proxy) {
return (await import("electron")).net as Client;
return (await import("electron")).net as unknown as Client;
} else {
const { protocol } = url.parse(opts.url);