Blog34.6K views1,993 votes0 replies2,858 following
tRPC SuperJSON: Preserve Dates, Maps, and BigInts Across the API Boundary
tRPC normally turns Dates into strings and drops undefined values when serializing JSON. Using a data transformer like superjson preserves rich JavaScript types, keeping your TypeScript types accurate from server to client. This post shows how to set it up, tests to verify, and the trade‑offs.