aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Vijay A <vraravam@users.noreply.github.com>2021-10-03 07:52:38 +0530
committerLibravatar Vijay A <vraravam@users.noreply.github.com>2021-10-03 07:52:38 +0530
commit5617fd6cb55d0bba8ba9e3e19258845b6a6f08b8 (patch)
treee41e78cd5d5059d4d05ad44c6034a350219d7722
parent5.6.3-nightly.21 [skip ci] (diff)
downloadferdium-app-5617fd6cb55d0bba8ba9e3e19258845b6a6f08b8.tar.gz
ferdium-app-5617fd6cb55d0bba8ba9e3e19258845b6a6f08b8.tar.zst
ferdium-app-5617fd6cb55d0bba8ba9e3e19258845b6a6f08b8.zip
refactor: use correct datatypes in ts files
-rw-r--r--src/api/LocalApi.ts4
-rw-r--r--src/api/server/LocalApi.ts4
-rw-r--r--src/environment-remote.ts2
-rw-r--r--src/helpers/asar-helpers.ts2
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 {
8 this.local = local; 8 this.local = local;
9 } 9 }
10 10
11 getAppSettings(type: any) { 11 getAppSettings(type: string) {
12 return this.local.getAppSettings(type); 12 return this.local.getAppSettings(type);
13 } 13 }
14 14
15 updateAppSettings(type: any, data: any) { 15 updateAppSettings(type: string, data: any) {
16 return this.local.updateAppSettings(type, data); 16 return this.local.updateAppSettings(type, data);
17 } 17 }
18 18
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');
7 7
8export default class LocalApi { 8export default class LocalApi {
9 // Settings 9 // Settings
10 getAppSettings(type: any) { 10 getAppSettings(type: string) {
11 return new Promise(resolve => { 11 return new Promise(resolve => {
12 ipcRenderer.once('appSettings', (_event, resp) => { 12 ipcRenderer.once('appSettings', (_event, resp) => {
13 debug('LocalApi::getAppSettings resolves', resp.type, resp.data); 13 debug('LocalApi::getAppSettings resolves', resp.type, resp.data);
@@ -18,7 +18,7 @@ export default class LocalApi {
18 }); 18 });
19 } 19 }
20 20
21 async updateAppSettings(type: any, data: any) { 21 async updateAppSettings(type: string, data: any) {
22 debug('LocalApi::updateAppSettings resolves', type, data); 22 debug('LocalApi::updateAppSettings resolves', type, data);
23 ipcRenderer.send('updateAppSettings', { 23 ipcRenderer.send('updateAppSettings', {
24 type, 24 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[]) {
44 return join(app.getPath('userData'), ...[segments].flat()); 44 return join(app.getPath('userData'), ...[segments].flat());
45} 45}
46 46
47export function userDataRecipesPath(...segments: any[]) { 47export function userDataRecipesPath(...segments: string[]) {
48 return userDataPath('recipes', ...[segments].flat()); 48 return userDataPath('recipes', ...[segments].flat());
49} 49}
50 50
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 = '') {
5} 5}
6 6
7// Replacing app.asar is not beautiful but unfortunately necessary 7// Replacing app.asar is not beautiful but unfortunately necessary
8export function asarRecipesPath(...segments: any[]) { 8export function asarRecipesPath(...segments: string[]) {
9 return join(asarPath(join(__dirname, '..', 'recipes')), ...[segments].flat()); 9 return join(asarPath(join(__dirname, '..', 'recipes')), ...[segments].flat());
10} 10}