mirror of
https://github.com/Zagrios/bs-manager.git
synced 2026-07-03 14:08:25 +02:00
[chore] fix some lint warnings
This commit is contained in:
@@ -111,7 +111,7 @@ export class BeatSaverApiService {
|
||||
return {status: res.status, data: null};
|
||||
}
|
||||
|
||||
const data: any = await res.json();
|
||||
const data = await res.json();
|
||||
|
||||
return {status: res.status, data};
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@ export class BeatSaverService {
|
||||
|
||||
return this.bsaverApi.searchMaps(search).then(res => {
|
||||
return res.status === 200 ? res.data.docs : [];
|
||||
}).catch(err => {
|
||||
}).catch(() => {
|
||||
return [];
|
||||
});
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import { spawnSync } from "child_process";
|
||||
import path from "path";
|
||||
import { app, BrowserWindow } from "electron";
|
||||
import { IpcResponse } from "shared/models/ipc";
|
||||
@@ -45,7 +44,7 @@ export class UtilsService{
|
||||
}
|
||||
}
|
||||
|
||||
public ipcSend<T = any>(channel: string, response: IpcResponse<T>): void{
|
||||
public ipcSend<T = unknown>(channel: string, response: IpcResponse<T>): void{
|
||||
try {
|
||||
Array.from(this.windows.values()).forEach(window => window?.webContents?.send(channel, response));
|
||||
} catch (error) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { getFoldersInFolder, pathExist } from "../helpers/fs.helpers";
|
||||
import { getFoldersInFolder } from "../helpers/fs.helpers";
|
||||
import path from "path";
|
||||
import { VersionLinkerAction, VersionLinkFolderAction, VersionUnlinkFolderAction } from "renderer/services/version-folder-linker.service";
|
||||
import { BSVersion } from "shared/bs-version.interface";
|
||||
|
||||
@@ -80,7 +80,7 @@ export class WindowManagerService{
|
||||
}
|
||||
|
||||
public getAppWindowFromWebContents(sender: Electron.WebContents): AppWindow{
|
||||
return Array.from(this.windows.entries()).find(([key, value]) => value.webContents.id === sender.id)[0];
|
||||
return Array.from(this.windows.entries()).find(([, value]) => value.webContents.id === sender.id)[0];
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user