mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-12-16 23:05:23 +01:00
Added exhaustiveness checking
This commit is contained in:
parent
9d232199a3
commit
247321b529
@ -113,7 +113,9 @@ export function getTerrainStartMessage(terrainType: TerrainType): string {
|
|||||||
return i18next.t("terrain:grassyStartMessage");
|
return i18next.t("terrain:grassyStartMessage");
|
||||||
case TerrainType.PSYCHIC:
|
case TerrainType.PSYCHIC:
|
||||||
return i18next.t("terrain:psychicStartMessage");
|
return i18next.t("terrain:psychicStartMessage");
|
||||||
|
case TerrainType.NONE:
|
||||||
default:
|
default:
|
||||||
|
terrainType satisfies TerrainType.NONE;
|
||||||
console.warn(`${terrainType} unexpectedly provided as terrain type to getTerrainStartMessage!`);
|
console.warn(`${terrainType} unexpectedly provided as terrain type to getTerrainStartMessage!`);
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
@ -134,7 +136,9 @@ export function getTerrainClearMessage(terrainType: TerrainType): string {
|
|||||||
return i18next.t("terrain:grassyClearMessage");
|
return i18next.t("terrain:grassyClearMessage");
|
||||||
case TerrainType.PSYCHIC:
|
case TerrainType.PSYCHIC:
|
||||||
return i18next.t("terrain:psychicClearMessage");
|
return i18next.t("terrain:psychicClearMessage");
|
||||||
|
case TerrainType.NONE:
|
||||||
default:
|
default:
|
||||||
|
terrainType satisfies TerrainType.NONE;
|
||||||
console.warn(`${terrainType} unexpectedly provided as terrain type to getTerrainClearMessage!`);
|
console.warn(`${terrainType} unexpectedly provided as terrain type to getTerrainClearMessage!`);
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
@ -159,7 +163,9 @@ export function getTerrainBlockMessage(pokemon: Pokemon, terrainType: TerrainTyp
|
|||||||
pokemonNameWithAffix: getPokemonNameWithAffix(pokemon),
|
pokemonNameWithAffix: getPokemonNameWithAffix(pokemon),
|
||||||
terrainName: getTerrainName(terrainType),
|
terrainName: getTerrainName(terrainType),
|
||||||
});
|
});
|
||||||
|
case TerrainType.NONE:
|
||||||
default:
|
default:
|
||||||
|
terrainType satisfies TerrainType.NONE;
|
||||||
console.warn(`${terrainType} unexpectedly provided as terrain type to getTerrainBlockMessage!`);
|
console.warn(`${terrainType} unexpectedly provided as terrain type to getTerrainBlockMessage!`);
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user