Fix strict select subset typing under TS6#2720
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthrough
ChangesSelectSubset strict typing and test coverage
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related issues
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
Fixes a TypeScript 6 / tsgo typing gap where direct client calls accepted unknown nested keys in
selectobjects, even though the explicit args type rejected them.The issue was reported in #2719.
What changed
SelectSubsetforselect,include, andomitproperties so nested keys are checked against the contextual argument shape.selectfields on direct client calls.@ts-expect-error, matching their comments and the now-stricter compile-time behavior.Validation
pnpm --filter @zenstackhq/orm buildpnpm --filter e2e test:typecheckCreated by Codex on human request.
Summary by CodeRabbit
Release Notes
Refactor
Tests