3 ms·
Well, have you ever built something real? You sincerely believe that at runtime an API call will always be what you think it will be because you set the type in
by runawaybottle 5y ago
Well, have you ever built something real? You sincerely believe that at runtime an API call will always be what you think it will be because you set the type in Typescript?
I don’t want to be that guy, but there’s no way you built anything real.
‘hey guys, I totally set the type of the api response to String, so it’s always going to return a string, right right?’.
Wait till all your compile time type checks don’t mean jack shit on prod when multiple endpoints just do something unexpected. Now you have a UI that didn’t gracefully handle any of it, and have fun extolling the virtues of type checking to the business — ‘but it says right here, it’s a String!’.
And what if it’s not? The problem with induction.