3 ms·
I don't really use JS or TS, so sorry if it should be obvious, but why is that so much better? You just move the (incorrect) assumption from the logic to the t
by OJFord 3y ago
I don't really use JS or TS, so sorry if it should be obvious, but why is that so much better?
You just move the (incorrect) assumption from the logic to the type annotation? And you're still not going to get a compile-time error for it, because you're explicitly telling the compiler to make that assumption?