diff options
author | Puyodead1 <puyodead@proton.me> | 2023-08-06 23:15:35 -0400 |
---|---|---|
committer | Puyodead1 <puyodead@proton.me> | 2023-08-06 23:15:35 -0400 |
commit | fe4acbfee58e840412ed5d496fb565843d4a8cdd (patch) | |
tree | 3397988bd5ff2c812a0fbf688c1d375ad02df7d8 /src/util | |
parent | Fix connection class imports (diff) | |
download | server-fe4acbfee58e840412ed5d496fb565843d4a8cdd.tar.xz |
Fix linter warnings in connections
Diffstat (limited to 'src/util')
-rw-r--r-- | src/util/connections/ConnectionLoader.ts | 8 | ||||
-rw-r--r-- | src/util/connections/RefreshableConnection.ts | 1 |
2 files changed, 4 insertions, 5 deletions
diff --git a/src/util/connections/ConnectionLoader.ts b/src/util/connections/ConnectionLoader.ts index 6b27baec..e9dc6973 100644 --- a/src/util/connections/ConnectionLoader.ts +++ b/src/util/connections/ConnectionLoader.ts @@ -16,9 +16,9 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. */ +import { Connection } from "@spacebar/util"; import fs from "fs"; import path from "path"; -import { Connection } from "@spacebar/util"; import { ConnectionConfig } from "./ConnectionConfig"; import { ConnectionStore } from "./ConnectionStore"; @@ -48,8 +48,7 @@ export class ConnectionLoader { }); } - // eslint-disable-next-line @typescript-eslint/no-explicit-any - public static getConnectionConfig(id: string, defaults?: any): any { + public static getConnectionConfig<T>(id: string, defaults?: unknown): T { let cfg = ConnectionConfig.get()[id]; if (defaults) { if (cfg) cfg = Object.assign({}, defaults, cfg); @@ -70,8 +69,7 @@ export class ConnectionLoader { public static async setConnectionConfig( id: string, - // eslint-disable-next-line @typescript-eslint/no-explicit-any - config: Partial<any>, + config: Partial<unknown>, ): Promise<void> { if (!config) console.warn(`[Connections/WARN] ${id} tried to set config=null!`); diff --git a/src/util/connections/RefreshableConnection.ts b/src/util/connections/RefreshableConnection.ts index eaa88c1b..88ad8dab 100644 --- a/src/util/connections/RefreshableConnection.ts +++ b/src/util/connections/RefreshableConnection.ts @@ -25,6 +25,7 @@ import { Connection } from "./Connection"; */ export abstract class RefreshableConnection extends Connection { refreshEnabled = true; + /** * Refreshes the token for a connected account. * @param connectedAccount The connected account to refresh |