mirror of
https://github.com/maxswa/osrs-json-hiscores.git
synced 2025-10-15 10:19:04 +00:00
Add types
This commit is contained in:
73
src/types.ts
Normal file
73
src/types.ts
Normal file
@@ -0,0 +1,73 @@
|
|||||||
|
export type Gamemode = 'main' | 'iron' | 'hc' | 'ult' | 'dmm' | 'sdmm' | 'dmmt';
|
||||||
|
|
||||||
|
export type Mode = Gamemode | 'full';
|
||||||
|
|
||||||
|
export interface Skill {
|
||||||
|
rank: number;
|
||||||
|
level: number;
|
||||||
|
xp: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface Activity {
|
||||||
|
rank: number;
|
||||||
|
score: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
export type SkillName =
|
||||||
|
| 'overall'
|
||||||
|
| 'attack'
|
||||||
|
| 'defence'
|
||||||
|
| 'strength'
|
||||||
|
| 'hitpoints'
|
||||||
|
| 'ranged'
|
||||||
|
| 'prayer'
|
||||||
|
| 'magic'
|
||||||
|
| 'cooking'
|
||||||
|
| 'woodcutting'
|
||||||
|
| 'fletching'
|
||||||
|
| 'fishing'
|
||||||
|
| 'firemaking'
|
||||||
|
| 'crafting'
|
||||||
|
| 'smithing'
|
||||||
|
| 'mining'
|
||||||
|
| 'herblore'
|
||||||
|
| 'agility'
|
||||||
|
| 'thieving'
|
||||||
|
| 'slayer'
|
||||||
|
| 'farming'
|
||||||
|
| 'runecraft'
|
||||||
|
| 'hunter'
|
||||||
|
| 'construction';
|
||||||
|
|
||||||
|
export type Skills = { [Name in SkillName]: Skill };
|
||||||
|
|
||||||
|
export type ClueType =
|
||||||
|
| 'all'
|
||||||
|
| 'beginner'
|
||||||
|
| 'easy'
|
||||||
|
| 'medium'
|
||||||
|
| 'hard'
|
||||||
|
| 'elite'
|
||||||
|
| 'master';
|
||||||
|
|
||||||
|
export type Clues = { [Type in ClueType]: Activity };
|
||||||
|
|
||||||
|
export type BHType = 'rogue' | 'hunter';
|
||||||
|
|
||||||
|
export type BH = { [Type in BHType]: Activity };
|
||||||
|
|
||||||
|
export interface Stats {
|
||||||
|
skills: Skills;
|
||||||
|
clues: Clues;
|
||||||
|
bh: BH;
|
||||||
|
lms: Activity;
|
||||||
|
}
|
||||||
|
|
||||||
|
export type Modes = { [M in Gamemode]?: Stats };
|
||||||
|
|
||||||
|
export interface Player extends Modes {
|
||||||
|
rsn: string;
|
||||||
|
mode: Gamemode;
|
||||||
|
dead: boolean;
|
||||||
|
deironed: boolean;
|
||||||
|
}
|
Reference in New Issue
Block a user