From 5617fd6cb55d0bba8ba9e3e19258845b6a6f08b8 Mon Sep 17 00:00:00 2001 From: Vijay A Date: Sun, 3 Oct 2021 07:52:38 +0530 Subject: refactor: use correct datatypes in ts files --- src/api/LocalApi.ts | 4 ++-- src/api/server/LocalApi.ts | 4 ++-- src/environment-remote.ts | 2 +- src/helpers/asar-helpers.ts | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/api/LocalApi.ts b/src/api/LocalApi.ts index 0140a5450..1830369c7 100644 --- a/src/api/LocalApi.ts +++ b/src/api/LocalApi.ts @@ -8,11 +8,11 @@ export default class LocalApi { this.local = local; } - getAppSettings(type: any) { + getAppSettings(type: string) { return this.local.getAppSettings(type); } - updateAppSettings(type: any, data: any) { + updateAppSettings(type: string, data: any) { return this.local.updateAppSettings(type, data); } diff --git a/src/api/server/LocalApi.ts b/src/api/server/LocalApi.ts index cc7822e78..19eacf9ff 100644 --- a/src/api/server/LocalApi.ts +++ b/src/api/server/LocalApi.ts @@ -7,7 +7,7 @@ const debug = require('debug')('Ferdi:LocalApi'); export default class LocalApi { // Settings - getAppSettings(type: any) { + getAppSettings(type: string) { return new Promise(resolve => { ipcRenderer.once('appSettings', (_event, resp) => { debug('LocalApi::getAppSettings resolves', resp.type, resp.data); @@ -18,7 +18,7 @@ export default class LocalApi { }); } - async updateAppSettings(type: any, data: any) { + async updateAppSettings(type: string, data: any) { debug('LocalApi::updateAppSettings resolves', type, data); ipcRenderer.send('updateAppSettings', { type, diff --git a/src/environment-remote.ts b/src/environment-remote.ts index 89926a428..192510f37 100644 --- a/src/environment-remote.ts +++ b/src/environment-remote.ts @@ -44,7 +44,7 @@ export function userDataPath(...segments: string[]) { return join(app.getPath('userData'), ...[segments].flat()); } -export function userDataRecipesPath(...segments: any[]) { +export function userDataRecipesPath(...segments: string[]) { return userDataPath('recipes', ...[segments].flat()); } diff --git a/src/helpers/asar-helpers.ts b/src/helpers/asar-helpers.ts index 3da90625d..9d975c193 100644 --- a/src/helpers/asar-helpers.ts +++ b/src/helpers/asar-helpers.ts @@ -5,6 +5,6 @@ export function asarPath(dir: string = '') { } // Replacing app.asar is not beautiful but unfortunately necessary -export function asarRecipesPath(...segments: any[]) { +export function asarRecipesPath(...segments: string[]) { return join(asarPath(join(__dirname, '..', 'recipes')), ...[segments].flat()); } -- cgit v1.2.3-54-g00ecf