3 ms·
Why would casting hide errors?
by nojvek 7y ago
Why would casting hide errors?
- IggleSniggle 7y agoIn the simple case, if it could be Dog|Cat and you cast as Dog but you get a Cat, and TS could have told you about the error if it hadn't been forced to treat it as Dog. This can be fixed by having your types be derived by runtime validation.