You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In script-setup, defineProps a property of type ((x: any) => boolean) | null.
The repro above fails to execute, look at the Comp.vue JS tab for insight.
What is expected?
It works!
What is actually happening?
As can be seen in repro, SFC compiler generates type: [null, null] instead of type: [Function, Object].
Then at runtime, Vue crashes in assertType because it tries to do value instanceof type with type = null.
The text was updated successfully, but these errors were encountered:
Version
3.2.0-beta.1
Reproduction link
https://sfc.vuejs.org/#eyJBcHAudnVlIjoiPHRlbXBsYXRlPlxuICA8Q29tcCA6eD1cImZcIj48L0NvbXA+XG48L3RlbXBsYXRlPlxuXG48c2NyaXB0IHNldHVwPlxuICBpbXBvcnQgQ29tcCBmcm9tIFwiLi9Db21wLnZ1ZVwiO1xuXG5cdGZ1bmN0aW9uIGYoKSB7IHJldHVybiB0cnVlOyB9XG48L3NjcmlwdD4iLCJDb21wLnZ1ZSI6Ijx0ZW1wbGF0ZT5cbiAgaGVsbG9cbjwvdGVtcGxhdGU+XG5cbjxzY3JpcHQgc2V0dXAgbGFuZz1cInRzXCI+XG5cdGRlZmluZVByb3BzPHtcbiAgICB4OiAoKGl0ZW06IGFueSkgPT4gYm9vbGVhbikgfCBudWxsO1xuICB9PigpO1xuPC9zY3JpcHQ+In0=
Steps to reproduce
In script-setup,
defineProps
a property of type((x: any) => boolean) | null
.The repro above fails to execute, look at the
Comp.vue
JS tab for insight.What is expected?
It works!
What is actually happening?
As can be seen in repro, SFC compiler generates
type: [null, null]
instead oftype: [Function, Object]
.Then at runtime, Vue crashes in
assertType
because it tries to dovalue instanceof type
withtype = null
.The text was updated successfully, but these errors were encountered: