Version: rss-parser@3.13.0
The following code works as expected but fails to compile under Typescript:
import Parser from 'rss-parser';
const parser = new Parser({
customFields: {
feed: [['dc:language', 'language']]
}
});
Typescript error: Type '[string, string]' is not assignable to type 'string | number'. ts(2322)
It feels like this should be allowed for a few reasons:
- The README reads like it should work (no special case to say
feed is more restricted that item)
- The default fields defined in
lib/fields.js use these types of values (eg ['dc:publisher', 'publisher'])
- It does appear to work correctly when ignoring the Typescript error
Version:
rss-parser@3.13.0The following code works as expected but fails to compile under Typescript:
Typescript error:
Type '[string, string]' is not assignable to type 'string | number'. ts(2322)It feels like this should be allowed for a few reasons:
feedis more restricted thatitem)lib/fields.jsuse these types of values (eg['dc:publisher', 'publisher'])