docs(journeyitemcard): document why item.document! non-null assertion is safe
JourneyReader filters items to only those where document != null before passing them here — the ! assertion is valid by caller invariant. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -11,6 +11,7 @@ interface Props {
|
||||
|
||||
let { item }: Props = $props();
|
||||
|
||||
// Safe: JourneyReader filters out items where document === null before rendering this component.
|
||||
const doc = $derived(item.document!);
|
||||
const formattedDate = $derived(doc.documentDate ? formatDate(doc.documentDate, 'short') : null);
|
||||
const ariaLabel = $derived(
|
||||
|
||||
Reference in New Issue
Block a user