Skip to content

Conversation

@matiasedgeandnode
Copy link
Collaborator

Replace raw JSON casting with proper Schema.decodeUnknownSync for type-safe API response handling. This removes the expiresAt type hack by correctly decoding DateTimeUtc from the wire format and converting to Date.

  • Add schema parameter to fetch wrapper for runtime validation
  • Import schema classes for decoding (not just types)
  • Use DateTime.toDateUtc for proper DateTime.Utc → Date conversion
  • Remove tsconfig.tsbuildinfo build artifact from source control

Replace raw JSON casting with proper Schema.decodeUnknownSync for type-safe
API response handling. This removes the expiresAt type hack by correctly
decoding DateTimeUtc from the wire format and converting to Date.

- Add schema parameter to fetch wrapper for runtime validation
- Import schema classes for decoding (not just types)
- Use DateTime.toDateUtc for proper DateTime.Utc → Date conversion
- Remove tsconfig.tsbuildinfo build artifact from source control
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