Closed polemius closed 3 years ago
@polemius yeah, I once long ago used it to make some manual type casting easier.
with the hope to one day improve it to have it actually check the object itself, but soon I realised that that's an extremely complex issue and kind of out of scope :S
But back in the day I found it prettier to do type casting with that isObjectLike
as opposed to casting something to any
.
@mesqueeb I understand now. Thank you for explanation
From documentation I am not quite understanding what really do
isObjectLike
?Documentation says Returns whether the payload is an object like a type passed in < >
I can see that If I passed not an object then it will return the false:
But If I passed some object it will return the true any way:
Link to TS playgound