TypeError: Cannot read property 'name' of undefined in typescript code example Example: TypeError: Cannot read property 'name' of undefined ?tag undefined