TypeScript please give us reflection/runtime types

TypeScript users are pleading with the TypeScript team to address the lack of runtime type information in the language. The issue has been open on GitHub for seven years, and many projects have emerged as workarounds. Some of these projects, such as io-ts and zod, provide solutions for serialization and validation, but they require complex and bespoke code generation. There is a desire for a type reflection model that would allow for easier serialization and validation without the need for extensive boilerplate. The author urges the TypeScript team to prioritize this problem and provide guidance or recommend a library to address it. Additionally, the author suggests that type erasure, a key design goal of TypeScript, has inadvertently defeated its own purpose and suggests potential solutions such as a higher-order function or F# Type Providers. The author concludes by promising cake and ice-cream as rewards if the TypeScript team implements these changes in version 4.3.

https://github.com/akutruff/typescript-needs-types

To top