Re:Using TypeScript with React
by cryptica on Thursday August 22, 2019 @12:14PM
(#20769650)
This can happen if handling data from a remote client. Type checking does not happen at runtime so you still need to do your own schema validation even with TypeScript. So IMO it adds almost no value.
[ Parent
| on HN ]
Re:Using TypeScript with React
by jimmyspice on Thursday August 22, 2019 @01:56PM
(#20770721)
in which case your API layer should validate the data at runtime so that it only actually returns type T as it claims. then you are back to soundness