Use shorthand syntax for Array type definitions

This commit is contained in:
Matthias 2020-08-29 17:47:05 +02:00
parent e8aa806901
commit 01c7c67925
7 changed files with 10 additions and 10 deletions

View File

@ -28,7 +28,7 @@ const CHART_TRADE_COUNT = 'Trade Count';
},
})
export default class HourlyChart extends Vue {
@Prop({ required: true }) trades!: Array<Trade>;
@Prop({ required: true }) trades!: Trade[];
get hourlyData() {
const res = new Array(24);

View File

@ -77,11 +77,11 @@ export default class FTBotAPIPairList extends Vue {
@ftbot.Action addBlacklist!: (payload: BlacklistPayload) => Promise<BlacklistResponse>;
@ftbot.State whitelist!: Array<string>;
@ftbot.State whitelist!: string[];
@ftbot.State blacklist!: Array<string>;
@ftbot.State blacklist!: string[];
@ftbot.State pairlistMethods!: Array<string>;
@ftbot.State pairlistMethods!: string[];
created() {
this.initBlacklist();

View File

@ -16,7 +16,7 @@ const ftbot = namespace('ftbot');
@Component({})
export default class LogViewer extends Vue {
@ftbot.State lastLogs!: Array<Logs>;
@ftbot.State lastLogs!: Logs[];
@ftbot.Action getLogs;

View File

@ -16,7 +16,7 @@ const ftbot = namespace('ftbot');
@Component({})
export default class Performance extends Vue {
@ftbot.State performanceStats!: Array<PerformanceEntry>;
@ftbot.State performanceStats!: PerformanceEntry[];
private tableFields = [
{ key: 'pair', label: 'Pair' },

View File

@ -78,7 +78,7 @@ export default class TradeList extends Vue {
perPage = this.activeTrades ? 200 : 15;
tableFields: Array<Record<string, string | Function>> = [
tableFields: Record<string, string | Function>[] = [
{ key: 'trade_id', label: 'ID' },
{ key: 'pair', label: 'Pair' },
{ key: 'amount', label: 'Amount' },

View File

@ -26,7 +26,7 @@ const ftbot = namespace('ftbot');
},
})
export default class Trading extends Vue {
@ftbot.Getter closedTrades!: Array<Trade>;
@ftbot.Getter closedTrades!: Trade[];
@ftbot.State dailyStats!: DailyReturnValue;

View File

@ -100,9 +100,9 @@ const ftbot = namespace('ftbot');
export default class Trading extends Vue {
@ftbot.State detailTradeId!: string;
@ftbot.Getter openTrades!: Array<Trade>;
@ftbot.Getter openTrades!: Trade[];
@ftbot.Getter closedTrades!: Array<Trade>;
@ftbot.Getter closedTrades!: Trade[];
@ftbot.Getter [UserStoreGetters.tradeDetail]!: Trade;
}