Skip to content

Commit 8ce66f2

Browse files
authored
fix(rss): correct types for RSSFeedItem (#11299)
1 parent dbbd0a2 commit 8ce66f2

2 files changed

Lines changed: 8 additions & 3 deletions

File tree

.changeset/tricky-mirrors-carry.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@astrojs/rss': patch
3+
---
4+
5+
Fixes an issue where the `pagesGlobToRssItems` returned an incorrect type for `items`

packages/astro-rss/src/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,13 @@ export type RSSOptions = {
3232

3333
export type RSSFeedItem = {
3434
/** Link to item */
35-
link: z.infer<typeof rssSchema>['link'];
35+
link?: z.infer<typeof rssSchema>['link'];
3636
/** Full content of the item. Should be valid HTML */
3737
content?: z.infer<typeof rssSchema>['content'];
3838
/** Title of item */
39-
title: z.infer<typeof rssSchema>['title'];
39+
title?: z.infer<typeof rssSchema>['title'];
4040
/** Publication date of item */
41-
pubDate: z.infer<typeof rssSchema>['pubDate'];
41+
pubDate?: z.infer<typeof rssSchema>['pubDate'];
4242
/** Item description */
4343
description?: z.infer<typeof rssSchema>['description'];
4444
/** Append some other XML-valid data to this item */

0 commit comments

Comments
 (0)