fix: add missing pinned/starred fields to in-memory feed adapter#784
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
The FeedItemSchema requires pinned and starred boolean fields, but the in-memory-feed-adapter was not including them when constructing new FeedItem objects, causing the DTS build to fail with TS2739. Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR fixes a TypeScript compilation error in the CI build process caused by missing pinned and starred fields in the InMemoryFeedAdapter. The FeedItemSchema was updated to include these new boolean fields with default values, but the in-memory adapter's manual construction of FeedItem objects wasn't updated to match the TypeScript type requirements.
Changes:
- Added
pinned: falseandstarred: falseto theFeedItemobject construction inInMemoryFeedAdapter.createFeedItem()method
| pinned: false, | ||
| starred: false, |
There was a problem hiding this comment.
The test 'should create a feed item and return it' verifies other default fields (visibility, replyCount, isEdited) but doesn't verify the newly added pinned and starred fields. Consider adding assertions to check that item.pinned is false and item.starred is false to ensure these default values are properly set.
FeedItemSchemaadded requiredpinnedandstarredboolean fields, butInMemoryFeedAdapterwas not updated — causing TS2739 during DTS build in theBuild CoreCI job.pinned: falseandstarred: falsetoFeedItemconstruction inin-memory-feed-adapter.tsOriginal prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.