mirror of
https://github.com/vkaelin/LeagueStats.git
synced 2026-03-25 12:57:28 +00:00
refactor: rename support to utility in RoleIdentificationService too
This commit is contained in:
parent
e3f6103a0d
commit
68e3cb821b
1 changed files with 2 additions and 13 deletions
|
|
@ -11,14 +11,6 @@ export interface ChampionsPlayRate {
|
|||
}
|
||||
}
|
||||
|
||||
export interface FinalRoleComposition {
|
||||
TOP?: number
|
||||
JUNGLE?: number
|
||||
MIDDLE?: number
|
||||
BOTTOM?: number
|
||||
SUPPORT?: number
|
||||
}
|
||||
|
||||
export interface RoleComposition {
|
||||
TOP?: number
|
||||
JUNGLE?: number
|
||||
|
|
@ -215,7 +207,7 @@ class RoleIdentificationService {
|
|||
composition: number[],
|
||||
jungle?: number,
|
||||
support?: number
|
||||
): FinalRoleComposition {
|
||||
): RoleComposition {
|
||||
// Set composition champion playrate to 0% if not present in the json data
|
||||
for (const compChamp of composition) {
|
||||
if (championPositions[compChamp]) {
|
||||
|
|
@ -304,10 +296,7 @@ class RoleIdentificationService {
|
|||
identified[best[0]] = best[1]
|
||||
}
|
||||
|
||||
// Rename UTILITY to SUPPORT
|
||||
const { UTILITY: SUPPORT, ...rest } = positions
|
||||
|
||||
return { ...rest, SUPPORT }
|
||||
return positions
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue