Closed

Description
Bug Report
π Search Terms
merging object spread
π Version & Regression Information
- This is the behavior in every version I tried, and I reviewed the FAQ for entries about object spreads
β― Playground Link
Playground link with relevant code
π» Code
declare const A: {foo: () => void}
declare const B: {foo?: () => void}
const C = {...A, ...B};
π Actual behavior
const C: {
foo: (() => void) | (() => void);
}
π Expected behavior
const C: {
foo: () => void;
}
Notes
Note that this merges primitives, but not functions or objects as far as I can tell