In the interface FeedData the property decription is declared as:
However sometimes the description element in the parsed RSS feed is returned as object:
"description": {
"#text": "Updates, ideas, and inspiration from GitHub to help developers build and design software.",
"@_type": "text"
},
To accurately reflect this situation the FeedData interface could be changed like so:
/**
* Type for property bag objects (key -> value) with unknown content.
*/
export type TPropertyBag = { [key: string]: any };
export interface FeedData {
link?: string;
title?: string;
description?: string | TPropertyBag ;
generator?: string;
language?: string;
published?: string;
entries?: Array<FeedEntry>;
}
Alternatively, the extractor could desctructure the description element and just return the string.
feed.zip