-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtypes.d.ts
More file actions
48 lines (44 loc) · 1.05 KB
/
types.d.ts
File metadata and controls
48 lines (44 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
export type AbilityType =
| 'passive'
| 'first'
| 'second'
| 'third'
| 'ultimate';
export interface Ability {
name: string;
icon_url: string;
video_url: string;
description: string;
ability_type: AbilityType;
}
export interface Skin {
name: string;
image_url: string;
}
export enum ChampionDifficulty {
Easy = 1,
Medium,
Hard
}
export interface ChampionHeader {
id: string;
name: string;
image_url: string;
}
export interface Champion extends ChampionHeader {
role: string;
skins: Skin[];
intro_video_url: string;
difficulty: ChampionDifficulty;
abilities: Record<AbilityType, Ability>;
}
export interface WildRiftAPI {
readonly championList: Champion[];
readonly championHeaders: ChampionHeader[];
/** Fetch all champion headers (basic info); stored in championHeaders */
loadChampionHeaders(): Promise<ChampionHeader[]>;
/** Returns a champion. Does not automatically store in class */
fetchChampion(champion: ChampionHeader): Promise<Champion>;
/** Fetch all champions; stored in championList */
loadChampions(): Promise<Champion[]>;
}