Skip to content

Commit d950aee

Browse files
committed
Add explicit undefineds to types
1 parent 6e1cd56 commit d950aee

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

lib/types.js

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
* An author object
44
* @property {string} name
55
* Example: `'Acme, Inc.'` or `'Jane Doe'`
6-
* @property {string} [email]
6+
* @property {string|undefined} [email]
77
* Example: `[email protected]`
8-
* @property {string} [url]
8+
* @property {string|undefined} [url]
99
* Example: `'https://example.org/john'`.
1010
* `url` is used in `atom`, not in `rss`.
1111
*
@@ -26,57 +26,57 @@
2626
* @property {string} url
2727
* Full URL to the site (required, example:
2828
* `'https://www.theguardian.com/world/zimbabwe'`).
29-
* @property {string} [feedUrl]
29+
* @property {string|undefined} [feedUrl]
3030
* Full URL to this channel (example:
3131
* `'https://www.adweek.com/feed/'`).
3232
* Make sure to pass different ones to `rss` and `atom`!
3333
* You *should* define this.
34-
* @property {string} [description]
34+
* @property {string|undefined} [description]
3535
* Short description of the channel (example: `Album Reviews`).
3636
* You *should* define this.
37-
* @property {string} [lang]
37+
* @property {string|undefined} [lang]
3838
* BCP 47 language tag representing the language of the whole channel (example:
3939
* `'fr-BE'`).
4040
* You *should* define this.
41-
* @property {string|Author} [author] Optional author of the whole channel.
41+
* @property {string|Author|undefined} [author] Optional author of the whole channel.
4242
* Either `string`, in which case it’s as passing `{name: string}`.
4343
* Or an author object.
44-
* @property {Array<string>} [tags] Categories of the channel (example:
44+
* @property {Array<string>|undefined} [tags] Categories of the channel (example:
4545
* `['JavaScript', 'React']`).
4646
*
4747
* @typedef Entry
4848
* Data on a single item.
49-
* @property {string} [title]
49+
* @property {string|undefined} [title]
5050
* Title of the item (example: `'Playboi Carti: Whole Lotta Red'`).
5151
* Either `title`, `description`, or `descriptionHtml` must be set.
52-
* @property {string} [description]
52+
* @property {string|undefined} [description]
5353
* Either the whole post or an excerpt of it (example: `'Lorem'`).
5454
* Should be plain text.
5555
* `descriptionHtml` is preferred over plain text `description`.
5656
* Either `title`, `description`, or `descriptionHtml` must be set.
57-
* @property {string} [descriptionHtml]
57+
* @property {string|undefined} [descriptionHtml]
5858
* Either the whole post or an excerpt of it (example: `'<p>Lorem</p>'`).
5959
* Should be serialized HTML.
6060
* `descriptionHtml` is preferred over plain text `description`.
6161
* Either `title`, `description`, or `descriptionHtml` must be set.
62-
* @property {string|Author} [author]
62+
* @property {string|Author|undefined} [author]
6363
* Entry version of `channel.author`.
6464
* You *should* define this.
6565
* For `atom`, it is required to either set `channel.author` or set `author`
6666
* on all entries.
67-
* @property {string} [url]
67+
* @property {string|undefined} [url]
6868
* Full URL of this entry on the *site* (example:
6969
* `'https://pitchfork.com/reviews/albums/roberta-flack-first-take'`).
70-
* @property {Date|number|string} [published]
70+
* @property {Date|number|string|undefined} [published]
7171
* When the entry was first published (`Date` or value for `new Date(x)`,
7272
* optional).
73-
* @property {Date|number|string} [modified]
73+
* @property {Date|number|string|undefined} [modified]
7474
* When the entry was last modified (`Date` or value for `new Date(x)`,
7575
* optional).
76-
* @property {Array<string>} [tags]
76+
* @property {Array<string>|undefined} [tags]
7777
* Categories of the entry (`Array<string>?`, example:
7878
* `['laravel', 'debugging']`).
79-
* @property {Enclosure} [enclosure]
79+
* @property {Enclosure|undefined} [enclosure]
8080
* Attached media.
8181
*/
8282

0 commit comments

Comments
 (0)