2 ms·
You might be (very) interested in this project then: https://deepkit.io/ https://deepkit.io/ The guy behind it made a PR to typescript proposing runtime availa
by davidatbu 4y ago
You might be (very) interested in this project then: https://deepkit.io/ https://deepkit.io/
The guy behind it made a PR to typescript proposing runtime availability of types[0], got rejected, and got going on it by himself. And he already has PoC libraries with the (early) equivalents of Pydantic/FastAPI/SQLModel (using runtime types for (de)serialization).
I really hope this experiment works out and that it gains traction, because it's a massive value add to TS IMO.
[0] https://github.com/microsoft/TypeScript/issues/47658 https://github.com/microsoft/TypeScript/issues/47658
- cdrini 4y agoOh wow! You are correct, I am very interested in it! Thanks for sharing! Honestly on most of my personal projects, I only use typescript via the jsdoc interface. I just never felt the need to get to 100% type safety for most projects. And I never liked how the types lend themselves to a style of programming which typescript can't support due to lack of runtime typing (eg multiple dispatch, function overloading, serialisation, etc). This project looks very cool, and shifts those tradeoffs for me! I'm going to need to give it a whirl!