All 35 Bugs /
0/35 Fixed ✓
TypeScriptMedium~10 min

Generic Constraint Missing Property Access Bug

What's Broken (Symptom)

A generic sorting/pluck utility accesses `.id` without constraining `T extends { id: string }`, allowing items missing `id` to produce `"undefined"` keys.

Expected Behavior

  • • Constrain `<T extends { id: string | number }>` and filter/throw cleanly if an untyped runtime item lacks a valid `id`.

Debugging Hints (0/2 used)

Try spotting the bug in the editor first. Need a nudge? Reveal Hint 1 anytime.

Root Cause Breakdown

Pass all 1 automated verification checks on the right to unlock the full Root Cause explanation.

Automated Bug Verification

1 Checks Ready
  • Indexes valid items and skips records missing idNever stores an entry under key "undefined".
bugfix.ts
Live Sandboxed PreviewCtrl + Enter to verify
Console Output0 log(s)
No console output yet. Run Preview or Verify Bug Fix.