Skip to content

Conversation

@david-crespo
Copy link
Collaborator

@david-crespo david-crespo commented Dec 11, 2025

Just clearing out an old to-do list item. We were incorrectly using nextPage instead of next_page in the pagination helper. TypeScript allowed this because next_page is optional and TypeScript can't prevent you from adding extra keys (nextPage) that aren't in the specified return type. This didn't cause any problems because on the client side, the next_page is converted to nextPage anyway. So we were just putting the "right" key in there to begin with and it was being left alone by the camel-casing logic. I explored finding ways to enforce an exact type which would disallow unexpected keys in API responses, but TypeScript makes this really tough (see microsoft/TypeScript#12936).

@vercel
Copy link

vercel bot commented Dec 11, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Updated (UTC)
console Ready Ready Preview Dec 11, 2025 3:42pm

@david-crespo david-crespo enabled auto-merge (squash) December 11, 2025 15:43
@david-crespo david-crespo merged commit e8b79c3 into main Dec 11, 2025
7 checks passed
@david-crespo david-crespo deleted the fix-msw-next-page-typo branch December 11, 2025 15:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants