error TS2532: Object is possibly 'undefined' react typescript code example Example: angular error TS2532: Object is possibly 'undefined'. npm install typescript@beta