From 17993da2161bc5f37b9a053740d270d29c2f7aad Mon Sep 17 00:00:00 2001 From: Tim Hostetler <6970899+thostetler@users.noreply.github.com> Date: Thu, 28 May 2026 12:37:57 -0400 Subject: [PATCH] fix(types): mark IDocsEntity.mention and mention_count optional Both fields were added without optional markers while every adjacent field on IDocsEntity is optional. Solr responses do not guarantee these fields, and the two existing consumers in AbstractSideNav already use optional chaining and falsy guards on doc.mention. Aligning the type with how the data is actually used clears 21 TS2739 errors across test fixtures and mocks (plus 13 cascading typecheck errors). --- src/api/search/types.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/api/search/types.ts b/src/api/search/types.ts index 68afcab49..500643cb2 100644 --- a/src/api/search/types.ts +++ b/src/api/search/types.ts @@ -283,8 +283,8 @@ export interface IDocsEntity { keyword?: string[]; lang?: string; links_data?: string[]; - mention: string[]; - mention_count: number; + mention?: string[]; + mention_count?: number; nedid?: string; nedtype_object_facet_hier?: string; nedtype?: string;