diff --git a/match_collector/champion_stat.ts b/match_collector/champion_stat.ts index 8e6cc25..cbcc376 100644 --- a/match_collector/champion_stat.ts +++ b/match_collector/champion_stat.ts @@ -1,4 +1,4 @@ -function sameArrays(array1: Array, array2: Array) { +function sameArrays(array1: Array, array2: Array) { if (array1.length != array2.length) return false for (const e of array1) { if (!array2.includes(e)) return false @@ -71,7 +71,8 @@ type ChampionData = { lanes: Array } -function handleParticipantRunes(participant, runes: Array) { +// eslint-disable-next-line @typescript-eslint/no-explicit-any +function handleParticipantRunes(participant: any, runes: Array) { const primaryStyle = participant.perks.styles[0].style const secondaryStyle = participant.perks.styles[1].style const selections: Array = [] @@ -101,7 +102,13 @@ function handleParticipantRunes(participant, runes: Array) { if (addRunes) runes.push(gameRunes) } -function handleMatchItems(timeline, participant: any, participantIndex: number, builds: Builds) { +// eslint-disable-next-line @typescript-eslint/no-explicit-any +function handleMatchItems( + timeline: any, + participant: any, + participantIndex: number, + builds: Builds +) { const items: Array = [] for (const frame of timeline.info.frames) { for (const event of frame.events) { @@ -196,6 +203,7 @@ function handleMatchItems(timeline, participant: any, participantIndex: number, } } +// eslint-disable-next-line @typescript-eslint/no-explicit-any function handleMatch(match: any, champions: Map) { let participantIndex = 0 for (const participant of match.info.participants) { diff --git a/match_collector/item_tree.ts b/match_collector/item_tree.ts index 83d8761..46ff119 100644 --- a/match_collector/item_tree.ts +++ b/match_collector/item_tree.ts @@ -1,5 +1,5 @@ type ItemTree = { - data: any + data: number | undefined count: number children: Array } @@ -73,13 +73,6 @@ function treeCutBranches(itemtree: ItemTree, thresholdCount: number, thresholdPe itemtree.children.map(x => treeCutBranches(x, thresholdCount, thresholdPerc)) } -function treeMergeTree(itemtree1: ItemTree, itemtree2: ItemTree) { - for (const child of itemtree2.children) { - const node = nodeMerge(itemtree1, child) - treeMergeTree(node, child) - } -} - function treeSort(itemtree: ItemTree) { itemtree.children.sort((a, b) => b.count - a.count)