I came across this situation when refactoring a function to return an object in lieu of an array, but I forgot to update the return value Within the if assertion. This seems to be comparable to this difficulty: Phony "Property won't exist on type 'hardly ever'" when switching benefit within https://smartworlddeveloper.co.in/