Skip to content

Commit

Permalink
docs: add missing JSDocs
Browse files Browse the repository at this point in the history
- Added missing JSDocs to ensure proper documentation of all relevant functions and variables
  • Loading branch information
mariokreitz committed Sep 27, 2024
1 parent 299a791 commit b945f74
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/app/components/pokemon-list/pokemon-list.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,10 @@ export class PokemonListComponent implements OnInit {
private isAudioPlaying = false;

/**
* Returns the current language setting.
* Returns the currently set language.
*
* @return {string} The current language setting.
*/

get language(): string {
return this.settingsService.getLanguage();
}
Expand Down Expand Up @@ -222,6 +221,12 @@ export class PokemonListComponent implements OnInit {
return cryUrl.endsWith('.ogg') && isIOS;
}

/**
* Reveals a random Pokémon by updating the pokeball image with the Pokémon's sprite.
*
* @param {Pokemon} randomPokemon - The Pokémon to be revealed.
* @return {void} No return value, the Pokémon is revealed instead.
*/
revealRandomPokemon(randomPokemon: Pokemon): void {
const pokeballImg = document.querySelector<HTMLImageElement>('.pokeball');
if (!pokeballImg) return;
Expand Down

0 comments on commit b945f74

Please sign in to comment.