3 ms·
User-defined typeguards are just fancy ‘as string’. They are not type safe.
by madeofpalk 6y ago
User-defined typeguards are just fancy ‘as string’. They are not type safe.
- benrbray 6y agoThey localize all the unsafe type casts to one place, where you can inspect the logic, though. Much better than having `as string` sprinkled throughout your code.