refactor: enforce specific strings for type parameter

This commit is contained in:
Lukas Obermann
2023-10-04 15:32:55 +02:00
parent ebec1a9198
commit fd12cd0d42
+2 -2
View File
@@ -88,7 +88,7 @@ export type DisplayedActiveLiturgy =
* knowledge.
*/
export const getActiveLiturgicalChantsOrCeremonies = <
K extends string,
K extends "liturgicalChant" | "ceremony",
T extends LiturgicalChant | Ceremony,
>(
kind: K,
@@ -135,7 +135,7 @@ export const getActiveLiturgicalChantsOrCeremonies = <
isInCharacterCreation,
startExperienceLevel,
exceptionalSkill,
"LiturgicalChant",
kind === "liturgicalChant" ? "LiturgicalChant" : "Ceremony",
)
return {