-
-
Notifications
You must be signed in to change notification settings - Fork 8.8k
Closed
Description
Vue version
3.4
Link to minimal reproduction
Steps to reproduce
const [modelValue, modifiers] = defineModel<string, 'trim' | 'uppercase'>();
// @ts-expect-error
if (modifiers.trim) {}
What is expected?
modifiers
type should be a Record or undefined
What is actually happening?
modifiers
type is always a Record, but its runtime value can be undefined. So either fix modifiers type or use an empty object as a fallback?
System Info
No response
Any additional comments?
No response
Metadata
Metadata
Assignees
Labels
No labels