diff --git a/src/features/tooltips/tooltip.ts b/src/features/tooltips/tooltip.ts index 129bd16..b5b1042 100644 --- a/src/features/tooltips/tooltip.ts +++ b/src/features/tooltips/tooltip.ts @@ -52,7 +52,7 @@ export interface BaseTooltip { export type Tooltip = Replace< T & BaseTooltip, { - pinnable: T["pinnable"] extends undefined ? false : T["pinnable"]; + pinnable: undefined extends T["pinnable"] ? false : T["pinnable"]; pinned: T["pinnable"] extends true ? Ref : undefined; display: GetComputableType; classes: GetComputableType; diff --git a/src/game/modifiers.tsx b/src/game/modifiers.tsx index cceacd8..b65e7fc 100644 --- a/src/game/modifiers.tsx +++ b/src/game/modifiers.tsx @@ -41,11 +41,11 @@ export interface Modifier { /** * Utility type used to narrow down a modifier type that will have a description and/or enabled property based on optional parameters, T and S (respectively). */ -export type ModifierFromOptionalParams = T extends undefined - ? S extends undefined +export type ModifierFromOptionalParams = undefined extends T + ? undefined extends S ? Omit, "description" | "enabled"> : Omit, "description"> - : S extends undefined + : undefined extends S ? Omit, "enabled"> : WithRequired;