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