Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 9k
types(defineProps): avoid never props becoming boolean flags#14059
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base:main
Are you sure you want to change the base?
Uh oh!
There was an error while loading. Please reload this page.
Conversation
edison1105 commented Nov 6, 2025 • edited by coderabbitai bot
Loading Uh oh!
There was an error while loading. Please reload this page.
edited by coderabbitai bot
Uh oh!
There was an error while loading. Please reload this page.
coderabbitaibot commented Nov 6, 2025 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
WalkthroughRefines a conditional type used to detect boolean-like prop keys and adds a type test ensuring props declared as Changes
Sequence Diagram(s)sequenceDiagram participant Dev as defineProps call site participant BooleanKey as BooleanKey<T> participant TS as TypeScript resolver Note over Dev,TS: Type selection for each prop key Dev->>BooleanKey: provide prop type T[K] BooleanKey->>TS: evaluate "T[K] extends boolean | undefined?" TS-->>BooleanKey: yes/no alt matches boolean|undefined BooleanKey->>TS: evaluate "T[K] extends never | undefined?" TS-->>BooleanKey: yes -> exclude key TS-->>BooleanKey: no -> include key else does not match BooleanKey-->>Dev: exclude key end Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Suggested reviewers
Poem
Pre-merge checks and finishing touches✅ Passed checks (5 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
Comment |
github-actionsbot commented Nov 6, 2025 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
Size ReportBundles
Usages
|
pkg-pr-newbot commented Nov 6, 2025 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
@vue/compiler-core@vue/compiler-dom@vue/compiler-sfc@vue/compiler-ssr@vue/reactivity@vue/runtime-core@vue/runtime-dom@vue/server-renderer@vue/sharedvue@vue/compatcommit: |
Uh oh!
There was an error while loading. Please reload this page.
edison1105 commented Nov 10, 2025
/ecosystem-ci run |
vue-bot commented Nov 10, 2025
📝 Ran ecosystem CI: Open
|
close#14056
Summary by CodeRabbit
Tests
never, ensuring regressions are caught.Bug Fixes
defineProps, providing stricter and more accurate editor hints and fewer incorrect type widenings.