Skip to content

Commit 748c24d

Browse files
committed
Improve type compliance
1 parent 9b4d1e4 commit 748c24d

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

src/components/charts/ProfitDistributionChart.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
</template>
2424

2525
<script lang="ts">
26-
import { defineComponent, ref, computed } from 'vue';
26+
import { defineComponent, computed } from 'vue';
2727
import ECharts from 'vue-echarts';
2828
import { EChartsOption } from 'echarts';
2929

src/stores/ftbot.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ export function createBotSubStore(botId: string, botName: string) {
213213
try {
214214
this.refreshing = true;
215215
// TODO: Should be AxiosInstance
216-
const updates: Promise<any>[] = [];
216+
const updates: Promise<unknown>[] = [];
217217
updates.push(this.getPerformance());
218218
updates.push(this.getProfit());
219219
updates.push(this.getTrades());
@@ -862,7 +862,7 @@ export function createBotSubStore(botId: string, botName: string) {
862862
) {
863863
return;
864864
}
865-
const { status, data, send, open, close, ws } = useWebSocket(
865+
const { send, close } = useWebSocket(
866866
// 'ws://localhost:8080/api/v1/message/ws?token=testtoken',
867867
`${userService.getBaseWsUrl()}/message/ws?token=${userService.getAccessToken()}`,
868868
{

src/stores/ftbotwrapper.ts

+9-9
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ export const useBotStore = defineStore('wrapper', {
216216
this.globalAutoRefresh = value;
217217
},
218218
async allRefreshFrequent(forceUpdate = false) {
219-
const updates: Promise<any>[] = [];
219+
const updates: Promise<unknown>[] = [];
220220
this.allBotStores.forEach(async (e) => {
221221
if (e.refreshNow && (this.globalAutoRefresh || forceUpdate)) {
222222
updates.push(e.refreshFrequent());
@@ -242,14 +242,14 @@ export const useBotStore = defineStore('wrapper', {
242242
await this.pingAll();
243243

244244
const botStoreUpdates: Promise<any>[] = [];
245-
this.allBotStores.forEach((e) => {
246-
if (e.isBotOnline && !e.botStatusAvailable) {
247-
botStoreUpdates.push(e.getState());
245+
this.allBotStores.forEach((bot) => {
246+
if (bot.isBotOnline && !bot.botStatusAvailable) {
247+
botStoreUpdates.push(bot.getState());
248248
}
249249
});
250250
await Promise.all(botStoreUpdates);
251251

252-
const updates: Promise<any>[] = [];
252+
const updates: Promise<void>[] = [];
253253
updates.push(this.allRefreshFrequent(false));
254254
updates.push(this.allRefreshSlow(true));
255255
// updates.push(this.getDaily());
@@ -309,11 +309,11 @@ export const useBotStore = defineStore('wrapper', {
309309
});
310310
},
311311
async allGetDaily(payload: DailyPayload) {
312-
const updates: Promise<any>[] = [];
312+
const updates: Promise<DailyReturnValue>[] = [];
313313

314-
this.allBotStores.forEach((e) => {
315-
if (e.isBotOnline) {
316-
updates.push(e.getDaily(payload));
314+
this.allBotStores.forEach((bot) => {
315+
if (bot.isBotOnline) {
316+
updates.push(bot.getDaily(payload));
317317
}
318318
});
319319
await Promise.all(updates);

0 commit comments

Comments
 (0)