185
return undefined;
186
}
188
>
const parsed: IUpdateInfoFeature[] = [];
189
>
for (const feature of features) {
190
>
if (typeof feature !== 'object' || feature === null) {
191
continue;
192
}
193
>
const candidate = feature as { title?: unknown; description?: unknown; icon?: unknown };
updateInfoParser.ts
194
>
if (typeof candidate.title !== 'string' || typeof candidate.description !== 'string') {
195
continue;
196
}
197
>
const icon = typeof candidate.icon === 'string' ? candidate.icon : undefined;
updateInfoParser.ts
198
>
parsed.push({ icon, title: candidate.title, description: candidate.description });
199
>
if (parsed.length >= MAX_FEATURES) {
200
break;
201
}
203
>
204
return parsed.length ? parsed : undefined;
205
}