3 ms·
If the `something` function had `(num: string | number)` I would not be able to call `assertIsInRange(num: number)` because `Argument of type 'string | number'
by deepersprout 7y ago
If the `something` function had `(num: string | number)` I would not be able to call `assertIsInRange(num: number)` because `Argument of type 'string | number' is not assignable to parameter of type 'number'.`
So If I wanted to do that I would have to
if (typeof num === 'number') {
assertIsInRange(num);
}
anyway.
I think I still don't get it.