From 247321b529f8c9de39de71e25efd9cb93143f4b2 Mon Sep 17 00:00:00 2001 From: Bertie690 Date: Mon, 16 Jun 2025 17:22:56 -0400 Subject: [PATCH] Added exhaustiveness checking --- src/data/terrain.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/data/terrain.ts b/src/data/terrain.ts index 83cdf1db519..bcb28558de6 100644 --- a/src/data/terrain.ts +++ b/src/data/terrain.ts @@ -113,7 +113,9 @@ export function getTerrainStartMessage(terrainType: TerrainType): string { return i18next.t("terrain:grassyStartMessage"); case TerrainType.PSYCHIC: return i18next.t("terrain:psychicStartMessage"); + case TerrainType.NONE: default: + terrainType satisfies TerrainType.NONE; console.warn(`${terrainType} unexpectedly provided as terrain type to getTerrainStartMessage!`); return ""; } @@ -134,7 +136,9 @@ export function getTerrainClearMessage(terrainType: TerrainType): string { return i18next.t("terrain:grassyClearMessage"); case TerrainType.PSYCHIC: return i18next.t("terrain:psychicClearMessage"); + case TerrainType.NONE: default: + terrainType satisfies TerrainType.NONE; console.warn(`${terrainType} unexpectedly provided as terrain type to getTerrainClearMessage!`); return ""; } @@ -159,7 +163,9 @@ export function getTerrainBlockMessage(pokemon: Pokemon, terrainType: TerrainTyp pokemonNameWithAffix: getPokemonNameWithAffix(pokemon), terrainName: getTerrainName(terrainType), }); + case TerrainType.NONE: default: + terrainType satisfies TerrainType.NONE; console.warn(`${terrainType} unexpectedly provided as terrain type to getTerrainBlockMessage!`); return ""; }