Property does not exist on type never - Stack Overflow And the else part item name said Property 'name' does not exist on type 'never' Well this is because if there is nothing inside the item object - there can't be a name property as well
undefined is not assignable to type string - Stack Overflow When I make any property of an interface optional, and while assigning its member to some other variable like this: interface Person { name?: string, age?: string, gender?: string, occupati