Saying Goodbye to 'Stringly Typed' APIs: A New Perspective on Type Safety
2025-05-07
Inspired by Scott Hanselman, the author explores the concept of "stringly typed" applications, where strings are used for data transfer even when better types exist. This is common in single-page applications (SPAs) interacting with backend APIs, as most APIs use JSON, leading to type loss and reduced type safety. The author reflects on past tolerance for this approach and begins exploring solutions like TypeScript, tRPC, and GraphQL to achieve type safety over the network and eliminate "stringly typed" interfaces.
Development