refactor: make match-collector export its types, and consume them in frontend
This commit is contained in:
@@ -1,60 +1,43 @@
|
||||
import type { ItemStats } from 'dragon-item-parser'
|
||||
|
||||
declare global {
|
||||
type ChampionsResponse = {
|
||||
data: Ref<Array<Champion>>
|
||||
}
|
||||
type ChampionResponse = {
|
||||
data: Ref<ChampionFull>
|
||||
}
|
||||
type Champion = {
|
||||
name: string
|
||||
alias: string
|
||||
squarePortraitPath: string
|
||||
}
|
||||
type ChampionFull = {
|
||||
name: string
|
||||
alias: string
|
||||
squarePortraitPath: string
|
||||
title: string
|
||||
}
|
||||
type ItemResponse = {
|
||||
data: Ref<Array<Item>>
|
||||
}
|
||||
type Item = {
|
||||
id: number
|
||||
iconPath: string
|
||||
name?: string
|
||||
description?: string
|
||||
plaintext?: string
|
||||
into?: number[]
|
||||
from?: number[]
|
||||
price?: number
|
||||
priceTotal?: number
|
||||
stats?: ItemStats
|
||||
}
|
||||
type SummonerSpell = {
|
||||
id: number
|
||||
iconPath: string
|
||||
name: string
|
||||
}
|
||||
type PerksResponse = {
|
||||
data: Ref<Array<Perk>>
|
||||
}
|
||||
type Perk = {
|
||||
id: number
|
||||
name: string
|
||||
iconPath: string
|
||||
}
|
||||
type PerkStylesResponse = {
|
||||
data: Ref<{ styles: Array<PerkStyle> }>
|
||||
}
|
||||
type PerkStyle = {
|
||||
id: number
|
||||
name: string
|
||||
iconPath: string
|
||||
slots: Array<{ perks: Array<number> }>
|
||||
}
|
||||
type Champion = {
|
||||
name: string
|
||||
alias: string
|
||||
squarePortraitPath: string
|
||||
}
|
||||
type ChampionFull = {
|
||||
name: string
|
||||
alias: string
|
||||
squarePortraitPath: string
|
||||
title: string
|
||||
}
|
||||
type Item = {
|
||||
id: number
|
||||
iconPath: string
|
||||
name?: string
|
||||
description?: string
|
||||
plaintext?: string
|
||||
into?: number[]
|
||||
from?: number[]
|
||||
price?: number
|
||||
priceTotal?: number
|
||||
stats?: ItemStats
|
||||
}
|
||||
type SummonerSpell = {
|
||||
id: number
|
||||
iconPath: string
|
||||
name: string
|
||||
}
|
||||
type Perk = {
|
||||
id: number
|
||||
name: string
|
||||
iconPath: string
|
||||
}
|
||||
type PerkStyle = {
|
||||
id: number
|
||||
name: string
|
||||
iconPath: string
|
||||
slots: Array<{ perks: Array<number> }>
|
||||
}
|
||||
|
||||
export {}
|
||||
export type { Champion, ChampionFull, Item, SummonerSpell, Perk, PerkStyle }
|
||||
|
||||
Reference in New Issue
Block a user