|
|
|
|
|
by nicoburns
2882 days ago
|
|
Unfortunately TypeScript doesn't do runtime checks like this. It assumes that incoming data conforms to the type spec! However, you might be interested in the Rocket framework (written in Rust), which does do exactly that: https://rocket.rs/ |
|
https://medium.com/@stevenbradleyconsulting/from-0-to-type-s...