Skip to content

Commit

Permalink
fix(rss): correct types for RSSFeedItem (#11299)
Browse files Browse the repository at this point in the history
  • Loading branch information
ematipico committed Jun 20, 2024
1 parent dbbd0a2 commit 8ce66f2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/tricky-mirrors-carry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@astrojs/rss': patch
---

Fixes an issue where the `pagesGlobToRssItems` returned an incorrect type for `items`
6 changes: 3 additions & 3 deletions packages/astro-rss/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@ export type RSSOptions = {

export type RSSFeedItem = {
/** Link to item */
link: z.infer<typeof rssSchema>['link'];
link?: z.infer<typeof rssSchema>['link'];
/** Full content of the item. Should be valid HTML */
content?: z.infer<typeof rssSchema>['content'];
/** Title of item */
title: z.infer<typeof rssSchema>['title'];
title?: z.infer<typeof rssSchema>['title'];
/** Publication date of item */
pubDate: z.infer<typeof rssSchema>['pubDate'];
pubDate?: z.infer<typeof rssSchema>['pubDate'];
/** Item description */
description?: z.infer<typeof rssSchema>['description'];
/** Append some other XML-valid data to this item */
Expand Down

0 comments on commit 8ce66f2

Please sign in to comment.