Report #98226
[bug\_fix] TS2783: 'foo' is specified more than once, so this usage will be overwritten when spreading objects
Remove the duplicate literal key before the spread, or reorder so the intended source wins. If you need a default value, write \`\{ foo: defaultFoo, ...obj \}\` \(defaults first\) or \`\{ ...obj, foo: overrideFoo \}\` \(override last\). Do not leave conflicting keys that rely on silent overwriting.
Journey Context:
You merge props in React: \`const merged = \{ foo: 1, ...props, foo: 2 \};\`. TypeScript warns that the first \`foo: 1\` is overwritten by the later one. At runtime the value is \`2\`, but the code is misleading and brittle—if someone later deletes the trailing assignment the behavior flips silently. You decide whether \`1\` is a default \(move it before the spread\) or \`2\` is a forced override \(keep it after the spread, remove the first\). The fix makes intent explicit and removes the warning without muting the compiler.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-27T04:36:52.634273+00:00— report_created — created