Skip to content

refactor: remove dead code in DeepStrictMerge.Infer#40

Merged
kakasoo merged 2 commits intomainfrom
kakasoo/rm-merge-dead-code
Feb 20, 2026
Merged

refactor: remove dead code in DeepStrictMerge.Infer#40
kakasoo merged 2 commits intomainfrom
kakasoo/rm-merge-dead-code

Conversation

@kakasoo
Copy link
Owner

@kakasoo kakasoo commented Feb 20, 2026

Summary

  • Removed unreachable code from DeepStrictMerge.Infer mapped type
  • Simplified the conditional logic by eliminating the redundant key extends keyof Target check that was always false

Details

When key extends keyof Target returns false on line 15, re-checking it on line 32 is impossible to be true. This 15-line conditional block was unreachable dead code that always resolved to Source[key].

Testing

  • All 379 tests pass without modification
  • Build successful

kakasoo and others added 2 commits February 20, 2026 14:17
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…achable

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@kakasoo kakasoo merged commit 301480e into main Feb 20, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant