Bug Report
🔎 Search Terms
object values entries undefined optional properties
🕗 Version & Regression Information
- This changed between versions 4.2.3 and 4.3.2
⏯ Playground Link
Playground link with relevant code
💻 Code
const a: { b?: 1 | undefined } = { b: undefined };
const c = Object.values(a);
console.log(c); // Returns [undefined] but c has type 1[]
🙁 Actual behavior
c has type 1[] but can be equal to [undefined]
🙂 Expected behavior
c should have type (undefined | 1)[]