jpmonette / feed

A RSS, Atom and JSON Feed generator for Node.js, making content syndication simple and intuitive! 🚀

Home Page:https://github.com/jpmonette/feed

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Copyright and id shouldn't be required in Feed typings

robinmetral opened this issue · comments

Describe the bug

copyright and id are required in the typings for FeedOptions (equivalent to "channel" in the RSS 2.0 spec):

export interface FeedOptions {
id: string;
title: string;
updated?: Date;
generator?: string;
language?: string;
ttl?: number;
feed?: string;
feedLinks?: any;
hub?: string;
docs?: string;
author?: Author;
link?: string;
description?: string;
image?: string;
favicon?: string;
copyright: string;
}

Expected behavior

They shouldn't be required. The only required channel elements are title, link and description (source).

Actual behavior

They're required and the TS compiler complains if they're left out.

Versions (please complete the following information):

(n/a)

Additional context

Is this because we need them for anything else than building the actual RSS channel? Happy to make a PR fixing this if it's unintended.

@jpmonette I've just installed this package and spotted this straight away. Can this please be addressed?

id isn't even a valid optional top level element.