Skip to content

Fix createdAt/expiresAt to return proper Date objects#847

Closed
franco-zalamena-iterable wants to merge 1 commit intoIterable:masterfrom
franco-zalamena-iterable:fix/581-createdat-type-inconsistency
Closed

Fix createdAt/expiresAt to return proper Date objects#847
franco-zalamena-iterable wants to merge 1 commit intoIterable:masterfrom
franco-zalamena-iterable:fix/581-createdat-type-inconsistency

Conversation

@franco-zalamena-iterable
Copy link
Copy Markdown

@franco-zalamena-iterable franco-zalamena-iterable commented Apr 7, 2026

Summary

  • Fix createdAt parsing to return actual Date objects instead of numbers/strings
  • Ensures consistent behavior between iOS and Android

Test plan

  • Verify createdAt is a Date object on both iOS and Android
  • Verify typeof createdAt === 'object' (Date)
  • Test with luxon/moment date libraries

🤖 Generated with Claude Code

The previous implementation used setUTCMilliseconds() which returns a
number, not a Date object. This caused runtime type mismatches and
crashes when consumers called Date methods on these fields.

Also removes the @ts-ignore workaround and provides a default value
for priorityLevel to fix the exposed type error.

Fixes Iterable#581

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@franco-zalamena-iterable franco-zalamena-iterable deleted the fix/581-createdat-type-inconsistency branch April 8, 2026 14: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.

1 participant