Suggestion
It would be great to have TS documentation about "Object is possibly 'undefined'. ts(2532)" common cases that most everyone will run into and be puzzled about. The TS playground below shows such an example when using code like: obj[prop] || (obj[prop] = {}) and when most everyone would expect obj[prop] not to be flagged as 'undefined'.
TS Playground: link
🔍 Search Terms
Object is possibly 'undefined'. ts(2532)
TypeScript Object property assignment
TypeScript Object OR assignment undefined
✅ Viability Checklist
My suggestion meets these guidelines:
⭐ Suggestion
I would like to see common cases documentation about the "Object is possibly 'undefined'. ts(2532)" error. Maybe it exists and I could not find it.
📃 Motivating Example
I see many issues filed related to ts(2532) because of the current limitations of TypeScript.
💻 Use Cases
See TS Playground link.
Suggestion
It would be great to have TS documentation about "Object is possibly 'undefined'. ts(2532)" common cases that most everyone will run into and be puzzled about. The TS playground below shows such an example when using code like:
obj[prop] || (obj[prop] = {})and when most everyone would expectobj[prop]not to be flagged as 'undefined'.TS Playground: link
🔍 Search Terms
Object is possibly 'undefined'. ts(2532)
TypeScript Object property assignment
TypeScript Object OR assignment undefined
✅ Viability Checklist
My suggestion meets these guidelines:
⭐ Suggestion
I would like to see common cases documentation about the "Object is possibly 'undefined'. ts(2532)" error. Maybe it exists and I could not find it.
📃 Motivating Example
I see many issues filed related to ts(2532) because of the current limitations of TypeScript.
💻 Use Cases
See TS Playground link.