Files
GerbilManager/gerbil-manager-web/src/genetics/warnings.ts
2026-06-05 23:43:21 +02:00

23 lines
857 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/**
* Warning codes emitted by the genetics engine. The engine is language-neutral:
* it emits CODES only. German texts are mapped in de.ts (UI layer).
*
* Modelled as a const object (not a TS `enum`) because the project's tsconfig
* enables `erasableSyntaxOnly`.
*/
export const GeneticsWarningCode = {
/** Schecke × Schecke: SpSp embryos die in utero; ~25% fewer live young. */
ScheckeLethal: 'SCHECKE_LETHAL',
/** Rex × Rex: ReRe is semi-lethal; reduced viability of homozygous young. */
RexSemiLethal: 'REX_SEMI_LETHAL',
} as const
export type GeneticsWarningCode =
(typeof GeneticsWarningCode)[keyof typeof GeneticsWarningCode]
export interface GeneticsWarning {
readonly code: GeneticsWarningCode
/** Optional structured detail for the UI (e.g. fraction of young lost). */
readonly detail?: Record<string, string | number>
}