-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtypings.d.ts
85 lines (76 loc) · 1.66 KB
/
typings.d.ts
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
// * * PokemonDetails.TSX
type Indicies = { name: string; flavor_text: string }[];
type Moves = { name: string; flavor_text: string }[];
export interface Tabs {
indicies: Indicies;
moves: Moves;
}
export interface Ability {
ability: { name: string; url: string };
is_hidden: boolean;
slot: number;
}
export interface AbilityProps {
abilities: Ability[];
}
interface Stat {
base_stat: number;
stat_name: string;
}
export interface Variety {
id: number;
name: string;
types: string[];
height: string;
weight: string;
front_default_8bit: string;
front_default: string;
front_shiny: string;
stats: Stat[];
abilities: Ability[];
}
export interface VarietiesProps {
varieties: Variety[];
setCurrentVariety: (variety: Variety) => void;
setIsShiny: (shiny: string) => void;
shiny: boolean;
selected: string;
}
export interface PrevNextPokemon {
id: number | null;
nationalId: string | null;
name: string | null;
type: 'prev' | 'next';
sprite_front_default: string | null;
isAvailable: boolean;
}
export interface Evolution {
species_name: string;
nationalId: number;
image: string;
trigger?: string;
min_level?: number;
item?: {
name: string;
image: string;
};
}
export interface PokemonDetailsProps {
data: {
prev_next: PrevNextPokemon[];
name: string;
nationalId: number;
nameJaHrkt: string;
enFlavorText: string;
pokemonGenera: string;
front_default_8bit: string;
varieties: Variety[];
effectives: string[];
immunities: string[];
resistances: string[];
weaknesses: string[];
evolutionChain: Evolution[];
allEnFlavorText: Indicies;
moves: Moves;
};
}