-
-
Notifications
You must be signed in to change notification settings - Fork 8.8k
Closed
Labels
🔨 p3-minor-bugPriority 3: this fixes a bug, but is an edge case that only affects very specific usage.Priority 3: this fixes a bug, but is an edge case that only affects very specific usage.regressionscope: compilerscope: sfc
Description
Vue version
3.5.15
Link to minimal reproduction
Steps to reproduce
For some reason, the sfc playground always throws the error unless you're in MyComp.vue
's JS tab
Switching between 3.5.14 and 3.5.15 show the type of userId
prop change from null
to Object
What is expected?
No type errors
What is actually happening?
The nominal type is treated as Object
instead of a string primitive
Invalid prop: type check failed for prop "userId". Expected Object, got String with value "100".
at <MyCompuser-id="100">
at <Repl>
System Info
Any additional comments?
I'm aware TypeScript does not actually have nominal types and this is just a hack to fake it but I think this is a common enough usage in large codebases that it should be accounted for
Metadata
Metadata
Assignees
Labels
🔨 p3-minor-bugPriority 3: this fixes a bug, but is an edge case that only affects very specific usage.Priority 3: this fixes a bug, but is an edge case that only affects very specific usage.regressionscope: compilerscope: sfc
Type
Projects
Milestone
Relationships
Development
Select code repository
Activity
fix(compiler-sfc): improved type resolution for function type aliases (…