Hacker News new | ask | show | jobs
by greyblake 1613 days ago
There still "weak" points, where incorrect typing can be introduced, e.g. incorrectly written bindings. Regarding data from HTTP call in theory they can be cast to any type abusing `external` keyword which is meant for binings. But common and recommend approach is to write codes. Codec would perform all the necessary checks to ensure that the data are in correct shape to satisfy the type restrictions. You can see some examples here: https://github.com/greyblake/from-typescript-to-rescript/blo...