-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.d.ts
121 lines (102 loc) · 2.41 KB
/
index.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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
export function getPokemon(pokemonName: string | number): Promise<Pokemon>;
export function getAllPokemon(): Promise<Array<Pokemon>>;
export function getAllPokemonNames(): Promise<Array<PokemonNames>>;
export interface PokemonStatus {
hp: string;
attack: string;
defense: string;
specialAttack: string;
specialDefense: string;
speed: string;
height: string;
weight: string;
types: PokemonType;
}
export interface PokemonGenderRatio {
male: number;
female: number;
undefined: number;
}
export interface PokemonEggGroup {
name: string;
url: string;
}
export interface PokemonSpecie {
color: PokemonColor;
eggGroup: PokemonEggGroupArray;
genderRate: PokemonGenderRatio;
isLegendary: boolean;
isMythical: boolean;
isBaby: boolean;
habitat: PokemonHabitat;
generation: PokemonGeneration;
}
export interface PokemonEggGroupArray {
groups: Array<PokemonEggGroup>;
}
export interface PokemonColor {
name: string;
url: string;
}
export interface PokemonHabitat {
name: string;
url: string;
}
export interface PokemonGeneration {
name: string;
url: string;
}
export interface PokemonImage {
default: string;
UrlMaleOrUndefined: string;
UrlShiny: string;
UrlFemale?: string;
UrlShinyFemale?: string;
}
export interface PokemonTypeArray {
types: Array<PokemonType>;
}
export interface PokemonType {
name: PokemonTypeNames;
weakness: PokemonTypesWeakeness;
url?: string;
}
export interface PokemonTypeSlot {
slot: string;
type: PokemonType;
}
export interface Pokemon {
idPokedex: string;
name: string;
description: string;
color: PokemonColor;
habitat: PokemonHabitat;
generation: PokemonGeneration;
sexMalePorcentage: string | number | undefined;
sexFemalePorcentage: string | number | undefined;
undefinedPorcentage: string | number | undefined;
stats: PokemonStatus;
image: PokemonImage;
}
export interface PokemonTypesWeakeness {
damageDoubleFrom: string | Array<string>;
damageDoubleTo: string | Array<string>;
halfDamageFrom: string | Array<string>;
halfDamageTo: string | Array<string>;
noDamageFrom: string | Array<string>;
noDamegeTo: string | Array<string>;
}
export interface PokemonTypeNames {
type1: string;
type2?: string;
}
export interface PokemonNamesArray {
poke: Array<PokemonNames>;
}
export interface PokemonArray {
poke: Array<Pokemon>;
}
export interface PokemonNames {
idPokedex: string;
pokemonName: string;
}