0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2025-01-13 22:11:20 -05:00

fix(rss): correct types for RSSFeedItem (#11299)

This commit is contained in:
Emanuele Stoppa 2024-06-20 22:14:49 +01:00 committed by GitHub
parent dbbd0a22e2
commit 8ce66f2ef7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 8 additions and 3 deletions

View file

@ -0,0 +1,5 @@
---
'@astrojs/rss': patch
---
Fixes an issue where the `pagesGlobToRssItems` returned an incorrect type for `items`

View file

@ -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 */