From 1eddf2fbd720c230f83c9b2b323a083bbde69162 Mon Sep 17 00:00:00 2001 From: Sirz Benjie <142067137+SirzBenjie@users.noreply.github.com> Date: Wed, 10 Sep 2025 12:35:58 -0500 Subject: [PATCH] Remove {} appearing after `@returns` --- src/data/abilities/ability.ts | 2 +- src/data/challenge.ts | 20 ++++++++-------- src/data/moves/move.ts | 10 ++++---- .../utils/encounter-phase-utils.ts | 2 +- src/data/pokemon-species.ts | 2 +- src/data/trainers/trainer-config.ts | 24 +++++++++---------- src/field/pokemon.ts | 4 ++-- src/game-mode.ts | 4 ++-- src/messages.ts | 2 +- .../settings/move-touch-controls-handler.ts | 2 +- src/utils/common.ts | 2 +- typedoc.config.js | 3 ++- 12 files changed, 39 insertions(+), 38 deletions(-) diff --git a/src/data/abilities/ability.ts b/src/data/abilities/ability.ts index b568fd5f742..f3cafecd82d 100644 --- a/src/data/abilities/ability.ts +++ b/src/data/abilities/ability.ts @@ -4242,7 +4242,7 @@ function getAnticipationCondition(): AbAttrCondition { * has already been used by that pokemon that battle. It requires an ability to * be specified due to current limitations in how conditions on abilities work. * @param {AbilityId} ability The ability to check if it's already been applied - * @returns {AbAttrCondition} The condition + * @returns The condition */ function getOncePerBattleCondition(ability: AbilityId): AbAttrCondition { return (pokemon: Pokemon) => { diff --git a/src/data/challenge.ts b/src/data/challenge.ts index acbbccf2070..f6152dab781 100644 --- a/src/data/challenge.ts +++ b/src/data/challenge.ts @@ -289,11 +289,11 @@ export abstract class Challenge { /** * An apply function for AI_LEVEL challenges. Derived classes should alter this. - * @param _level {@link NumberHolder} The generated level. - * @param _levelCap {@link Number} The current level cap. - * @param _isTrainer {@link Boolean} Whether this is a trainer pokemon. - * @param _isBoss {@link Boolean} Whether this is a non-trainer boss pokemon. - * @returns {@link boolean} Whether this function did anything. + * @param _level - The generated level. + * @param _levelCap - The current level cap. + * @param _isTrainer - Whether this is a trainer pokemon. + * @param _isBoss - Whether this is a non-trainer boss pokemon. + * @returns - Whether this function did anything. */ applyLevelChange(_level: NumberHolder, _levelCap: number, _isTrainer: boolean, _isBoss: boolean): boolean { return false; @@ -301,9 +301,9 @@ export abstract class Challenge { /** * An apply function for AI_MOVE_SLOTS challenges. Derived classes should alter this. - * @param pokemon {@link Pokemon} The pokemon that is being considered. - * @param moveSlots {@link NumberHolder} The amount of move slots. - * @returns {@link boolean} Whether this function did anything. + * @param pokemon - The pokemon that is being considered. + * @param moveSlots - The amount of move slots. + * @returns Whether this function did anything. */ applyMoveSlot(_pokemon: Pokemon, _moveSlots: NumberHolder): boolean { return false; @@ -311,8 +311,8 @@ export abstract class Challenge { /** * An apply function for PASSIVE_ACCESS challenges. Derived classes should alter this. - * @param pokemon {@link Pokemon} The pokemon to change. - * @param hasPassive {@link BooleanHolder} Whether it should have its passive. + * @param _pokemon - The pokemon to change. + * @param _hasPassive - Whether it should have its passive. * @returns {@link boolean} Whether this function did anything. */ applyPassiveAccess(_pokemon: Pokemon, _hasPassive: BooleanHolder): boolean { diff --git a/src/data/moves/move.ts b/src/data/moves/move.ts index 1535737b3e1..d697334ac4d 100644 --- a/src/data/moves/move.ts +++ b/src/data/moves/move.ts @@ -4358,7 +4358,7 @@ export class PositiveStatStagePowerAttr extends VariablePowerAttr { * @param {Pokemon} target N/A * @param {Move} move N/A * @param {any[]} args The argument for VariablePowerAttr, accumulates and sets the amount of power multiplied by stats - * @returns {boolean} Returns true if attribute is applied + * @returns Returns true if attribute is applied */ apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean { const positiveStatStages: number = countPositiveStatStages(user); @@ -6686,7 +6686,7 @@ export class CopyBiomeTypeAttr extends MoveEffectAttr { /** * Retrieves a type from the current terrain * @param terrainType {@linkcode TerrainType} - * @returns {@linkcode Type} + * @returns */ private getTypeForTerrain(terrainType: TerrainType): PokemonType { switch (terrainType) { @@ -6707,7 +6707,7 @@ export class CopyBiomeTypeAttr extends MoveEffectAttr { /** * Retrieves a type from the current biome * @param biomeType {@linkcode BiomeId} - * @returns {@linkcode Type} + * @returns */ private getTypeForBiome(biomeType: BiomeId): PokemonType { switch (biomeType) { @@ -7442,7 +7442,7 @@ export class SketchAttr extends MoveEffectAttr { * @param {Pokemon} target Pokemon that the user wants to copy a move from * @param {Move} move Move being used * @param {any[]} args Unused - * @returns {boolean} true if the function succeeds, otherwise false + * @returns true if the function succeeds, otherwise false */ apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean { @@ -8148,7 +8148,7 @@ export class ResistLastMoveTypeAttr extends MoveEffectAttr { * @param {Pokemon} target Opposing pokemon that recently used a move * @param {Move} move Move being used * @param {any[]} args Unused - * @returns {boolean} true if the function succeeds + * @returns true if the function succeeds */ apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean { if (!super.apply(user, target, move, args)) { diff --git a/src/data/mystery-encounters/utils/encounter-phase-utils.ts b/src/data/mystery-encounters/utils/encounter-phase-utils.ts index 0aa7742d261..0903624d903 100644 --- a/src/data/mystery-encounters/utils/encounter-phase-utils.ts +++ b/src/data/mystery-encounters/utils/encounter-phase-utils.ts @@ -986,7 +986,7 @@ export function handleMysteryEncounterTurnStartEffects(): boolean { * @param level the level of the mon, which differs between MEs * @param isBoss whether the mon should be a Boss * @param rerollHidden whether the mon should get an extra roll for Hidden Ability - * @returns {@linkcode EnemyPokemon} for the requested encounter + * @returns for the requested encounter */ export function getRandomEncounterSpecies(level: number, isBoss = false, rerollHidden = false): EnemyPokemon { let bossSpecies: PokemonSpecies; diff --git a/src/data/pokemon-species.ts b/src/data/pokemon-species.ts index f91d3aaf1f2..97f02b59764 100644 --- a/src/data/pokemon-species.ts +++ b/src/data/pokemon-species.ts @@ -919,7 +919,7 @@ export class PokemonSpecies extends PokemonSpeciesForm implements Localizable { * The calculation with evolution delay is a weighted average of the easeIn and easeOut functions where preferredMinLevel is the denominator. * This also means a lower value of x will lead to a higher evolution chance. * @param strength {@linkcode PartyMemberStrength} The strength of the party member in question - * @returns {@linkcode number} The level difference from expected evolution level tolerated for a mon to be unevolved. Lower value = higher evolution chance. + * @returns The level difference from expected evolution level tolerated for a mon to be unevolved. Lower value = higher evolution chance. */ private getStrengthLevelDiff(strength: PartyMemberStrength): number { switch (Math.min(strength, PartyMemberStrength.STRONGER)) { diff --git a/src/data/trainers/trainer-config.ts b/src/data/trainers/trainer-config.ts index 2870fd7f808..24296f06c5f 100644 --- a/src/data/trainers/trainer-config.ts +++ b/src/data/trainers/trainer-config.ts @@ -204,7 +204,7 @@ export class TrainerConfig { /** * Returns the derived trainer type for a given trainer type. * @param trainerTypeToDeriveFrom - The trainer type to derive from. (If null, the this.trainerType property will be used.) - * @returns {TrainerType} - The derived trainer type. + * @returns - The derived trainer type. */ getDerivedType(trainerTypeToDeriveFrom: TrainerType | null = null): TrainerType { let trainerType = trainerTypeToDeriveFrom ? trainerTypeToDeriveFrom : this.trainerType; @@ -276,7 +276,7 @@ export class TrainerConfig { * Sets the configuration for trainers with genders, including the female name and encounter background music (BGM). * @param {string} [nameFemale] The name of the female trainer. If 'Ivy', a localized name will be assigned. * @param {TrainerType | string} [femaleEncounterBgm] The encounter BGM for the female trainer, which can be a TrainerType or a string. - * @returns {TrainerConfig} The updated TrainerConfig instance. + * @returns The updated TrainerConfig instance. */ setHasGenders(nameFemale?: string, femaleEncounterBgm?: TrainerType | string): TrainerConfig { // If the female name is 'Ivy' (the rival), assign a localized name. @@ -314,7 +314,7 @@ export class TrainerConfig { * Sets the configuration for trainers with double battles, including the name of the double trainer and the encounter BGM. * @param nameDouble The name of the double trainer (e.g., "Ace Duo" for Trainer Class Doubles or "red_blue_double" for NAMED trainer doubles). * @param doubleEncounterBgm The encounter BGM for the double trainer, which can be a TrainerType or a string. - * @returns {TrainerConfig} The updated TrainerConfig instance. + * @returns The updated TrainerConfig instance. */ setHasDouble(nameDouble: string, doubleEncounterBgm?: TrainerType | string): TrainerConfig { this.hasDouble = true; @@ -331,7 +331,7 @@ export class TrainerConfig { /** * Sets the trainer type for double battles. * @param trainerTypeDouble The TrainerType of the partner in a double battle. - * @returns {TrainerConfig} The updated TrainerConfig instance. + * @returns The updated TrainerConfig instance. */ setDoubleTrainerType(trainerTypeDouble: TrainerType): TrainerConfig { this.trainerTypeDouble = trainerTypeDouble; @@ -356,7 +356,7 @@ export class TrainerConfig { /** * Sets the title for double trainers * @param titleDouble The key for the title in the i18n file. (e.g., "champion_double"). - * @returns {TrainerConfig} The updated TrainerConfig instance. + * @returns The updated TrainerConfig instance. */ setDoubleTitle(titleDouble: string): TrainerConfig { // First check if i18n is initialized @@ -525,7 +525,7 @@ export class TrainerConfig { * @param poolName The evil team the admin belongs to. * @param {SpeciesId | SpeciesId[]} signatureSpecies The signature species for the evil team leader. * @param specialtyType The specialty Type of the admin, if they have one - * @returns {TrainerConfig} The updated TrainerConfig instance. + * @returns The updated TrainerConfig instance. */ initForEvilTeamAdmin( title: string, @@ -566,7 +566,7 @@ export class TrainerConfig { /** * Initializes the trainer configuration for a Stat Trainer, as part of the Trainer's Test Mystery Encounter. * @param _isMale Whether the stat trainer is Male or Female (for localization of the title). - * @returns {TrainerConfig} The updated TrainerConfig instance. + * @returns The updated TrainerConfig instance. */ initForStatTrainer(_isMale = false): TrainerConfig { if (!getIsInitialized()) { @@ -593,7 +593,7 @@ export class TrainerConfig { * @param {SpeciesId | SpeciesId[]} signatureSpecies The signature species for the evil team leader. * @param {PokemonType} specialtyType The specialty type for the evil team Leader. * @param boolean Whether or not this is the rematch fight - * @returns {TrainerConfig} The updated TrainerConfig instance. + * @returns The updated TrainerConfig instance. */ initForEvilTeamLeader( title: string, @@ -636,7 +636,7 @@ export class TrainerConfig { * @param {PokemonType} specialtyType The specialty type for the Gym Leader. * @param ignoreMinTeraWave Whether the Gym Leader always uses Tera (true), or only Teras after {@linkcode GYM_LEADER_TERA_WAVE} (false). Defaults to false. * @param teraSlot Optional, sets the party member in this slot to Terastallize. Wraps based on party size. - * @returns {TrainerConfig} The updated TrainerConfig instance. + * @returns The updated TrainerConfig instance. */ initForGymLeader( signatureSpecies: (SpeciesId | SpeciesId[])[], @@ -750,7 +750,7 @@ export class TrainerConfig { * Initializes the trainer configuration for a Champion. * @param {SpeciesId | SpeciesId[]} signatureSpecies The signature species for the Champion. * @param isMale Whether the Champion is Male or Female (for localization of the title). - * @returns {TrainerConfig} The updated TrainerConfig instance. + * @returns The updated TrainerConfig instance. */ initForChampion(isMale: boolean): TrainerConfig { // Check if the internationalization (i18n) system is initialized. @@ -785,7 +785,7 @@ export class TrainerConfig { /** * Sets a localized name for the trainer. This should only be used for trainers that dont use a "initFor" function and are considered "named" trainers * @param name - The name of the trainer. - * @returns {TrainerConfig} The updated TrainerConfig instance. + * @returns The updated TrainerConfig instance. */ setLocalizedName(name: string): TrainerConfig { // Check if the internationalization (i18n) system is initialized. @@ -800,7 +800,7 @@ export class TrainerConfig { * Retrieves the title for the trainer based on the provided trainer slot and variant. * @param {TrainerSlot} trainerSlot - The slot to determine which title to use. Defaults to TrainerSlot.NONE. * @param {TrainerVariant} variant - The variant of the trainer to determine the specific title. - * @returns {string} - The title of the trainer. + * @returns - The title of the trainer. */ getTitle(trainerSlot: TrainerSlot = TrainerSlot.NONE, variant: TrainerVariant): string { const ret = this.name; diff --git a/src/field/pokemon.ts b/src/field/pokemon.ts index 76af4f81950..7958e7530e5 100644 --- a/src/field/pokemon.ts +++ b/src/field/pokemon.ts @@ -2651,7 +2651,7 @@ export abstract class Pokemon extends Phaser.GameObjects.Container { * @param {boolean} includeEvolutionMoves Whether to include evolution moves * @param {boolean} simulateEvolutionChain Whether to include moves from prior evolutions * @param {boolean} includeRelearnerMoves Whether to include moves that would require a relearner. Note the move relearner inherently allows evolution moves - * @returns {LevelMoves} A list of moves and the levels they can be learned at + * @returns A list of moves and the levels they can be learned at */ getLevelMoves( startingLevel?: number, @@ -4440,7 +4440,7 @@ export abstract class Pokemon extends Phaser.GameObjects.Container { * @param user - The move user * @param target - The target of the move * - * @returns {boolean} `true` if the move is disabled for this Pokemon due to the player's target selection + * @returns `true` if the move is disabled for this Pokemon due to the player's target selection * * @see {@linkcode MoveRestrictionBattlerTag} */ diff --git a/src/game-mode.ts b/src/game-mode.ts index 05850dec9ee..cfbcbe6cfdc 100644 --- a/src/game-mode.ts +++ b/src/game-mode.ts @@ -316,7 +316,7 @@ export class GameMode implements GameModeConfig { /** * Checks whether there is a fixed battle on this gamemode on a given wave. * @param {number} waveIndex The wave to check. - * @returns {boolean} If this game mode has a fixed battle on this wave + * @returns If this game mode has a fixed battle on this wave */ isFixedBattle(waveIndex: number): boolean { const dummyConfig = new FixedBattleConfig(); @@ -329,7 +329,7 @@ export class GameMode implements GameModeConfig { /** * Returns the config for the fixed battle for a particular wave. * @param {number} waveIndex The wave to check. - * @returns {boolean} The fixed battle for this wave. + * @returns The fixed battle for this wave. */ getFixedBattle(waveIndex: number): FixedBattleConfig { const challengeConfig = new FixedBattleConfig(); diff --git a/src/messages.ts b/src/messages.ts index 177b4cc9b05..b163ca78df6 100644 --- a/src/messages.ts +++ b/src/messages.ts @@ -7,7 +7,7 @@ import i18next from "i18next"; * Retrieves the Pokemon's name, potentially with an affix indicating its role (wild or foe) in the current battle context, translated * @param pokemon {@linkcode Pokemon} name and battle context will be retrieved from this instance * @param {boolean} useIllusion - Whether we want the name of the illusion or not. Default value : true - * @returns {string} ex: "Wild Gengar", "Ectoplasma sauvage" + * @returns ex: "Wild Gengar", "Ectoplasma sauvage" */ export function getPokemonNameWithAffix(pokemon: Pokemon | undefined, useIllusion = true): string { if (!pokemon) { diff --git a/src/ui/settings/move-touch-controls-handler.ts b/src/ui/settings/move-touch-controls-handler.ts index 248ee76a850..dd7bceec55e 100644 --- a/src/ui/settings/move-touch-controls-handler.ts +++ b/src/ui/settings/move-touch-controls-handler.ts @@ -197,7 +197,7 @@ export class MoveTouchControlsHandler { /** * Returns the current positions of all touch controls that have moved from their default positions of this orientation. - * @returns {ControlPosition[]} The current positions of all touch controls that have moved from their default positions of this orientation + * @returns The current positions of all touch controls that have moved from their default positions of this orientation */ private getModifiedCurrentPositions(): ControlPosition[] { return this.getControlGroupElements() diff --git a/src/utils/common.ts b/src/utils/common.ts index 97e61b902d8..dab445262af 100644 --- a/src/utils/common.ts +++ b/src/utils/common.ts @@ -136,7 +136,7 @@ export function randSeedItem(items: T[]): T { /** * Shuffle a list using the seeded rng. Utilises the Fisher-Yates algorithm. * @param {Array} items An array of items. - * @returns {Array} A new shuffled array of items. + * @returns A new shuffled array of items. */ export function randSeedShuffle(items: T[]): T[] { if (items.length <= 1) { diff --git a/typedoc.config.js b/typedoc.config.js index ef932a5d077..450cfea1560 100644 --- a/typedoc.config.js +++ b/typedoc.config.js @@ -3,7 +3,7 @@ import { globSync } from "node:fs"; const dryRun = !!process.env.DRY_RUN?.match(/true/gi); /** - * @type {Partial} + * */ const config = { entryPoints: ["./src", "./test/test-utils"], @@ -61,4 +61,5 @@ if (!dryRun && process.env.REF_NAME) { }; } +// biome-ignore lint/style/noDefaultExport: required by TypeDoc export default config;