--- # nuzlocke-tracker-d5ht title: 'Bug: TypeScript build fails due to optional property type mismatches in journal components' status: todo type: bug priority: high created_at: 2026-03-20T15:39:00Z updated_at: 2026-03-20T15:39:00Z parent: nuzlocke-tracker-bw1m --- The frontend TypeScript build fails with 3 errors due to `exactOptionalPropertyTypes` being enabled. ## Errors 1. `JournalEntryPage.tsx:76` - `bossResults` and `bosses` props passed as `undefined` to `JournalEditor` 2. `JournalEntryPage.tsx:92` - `bossResult` and `boss` props passed as `undefined` to `JournalEntryView` 3. `RunEncounters.tsx:1170` - `bossResults` and `bosses` props passed as `undefined` to `JournalSection` ## Root Cause Optional props in interfaces are declared as `prop?: Type` but callers pass `undefined` values from React Query hooks. With `exactOptionalPropertyTypes: true`, TypeScript requires `prop?: Type | undefined` to allow explicit `undefined` values. ## Fix Update the interfaces in these files: - `JournalEditor.tsx` lines 9-10: change to `bossResults?: BossResult[] | undefined` and `bosses?: BossBattle[] | undefined` - `JournalEntryView.tsx` lines 8-9: change to `bossResult?: BossResult | null | undefined` and `boss?: BossBattle | null | undefined` - `JournalSection.tsx` lines 9-10: change to `bossResults?: BossResult[] | undefined` and `bosses?: BossBattle[] | undefined`