@@ -1042,6 +1042,8 @@ const emit = defineEmits(['a', 'b'])
1042
1042
unknown: UnknownType
1043
1043
unknownUnion: UnknownType | string
1044
1044
unknownIntersection: UnknownType & Object
1045
+ unknownUnionWithBoolean: UnknownType | boolean
1046
+ unknownUnionWithFunction: UnknownType | (() => any)
1045
1047
}>()
1046
1048
</script>` )
1047
1049
assertCode ( content )
@@ -1093,7 +1095,13 @@ const emit = defineEmits(['a', 'b'])
1093
1095
expect ( content ) . toMatch ( `unknownUnion: { type: null, required: true }` )
1094
1096
// intersection containing unknown type: narrow to the known types
1095
1097
expect ( content ) . toMatch (
1096
- `unknownIntersection: { type: Object, required: true }`
1098
+ `unknownIntersection: { type: Object, required: true },`
1099
+ )
1100
+ expect ( content ) . toMatch (
1101
+ `unknownUnionWithBoolean: { type: Boolean, required: true, skipCheck: true },`
1102
+ )
1103
+ expect ( content ) . toMatch (
1104
+ `unknownUnionWithFunction: { type: Function, required: true, skipCheck: true }`
1097
1105
)
1098
1106
expect ( bindings ) . toStrictEqual ( {
1099
1107
string : BindingTypes . PROPS ,
@@ -1131,7 +1139,9 @@ const emit = defineEmits(['a', 'b'])
1131
1139
nonNull : BindingTypes . PROPS ,
1132
1140
unknown : BindingTypes . PROPS ,
1133
1141
unknownUnion : BindingTypes . PROPS ,
1134
- unknownIntersection : BindingTypes . PROPS
1142
+ unknownIntersection : BindingTypes . PROPS ,
1143
+ unknownUnionWithBoolean : BindingTypes . PROPS ,
1144
+ unknownUnionWithFunction : BindingTypes . PROPS
1135
1145
} )
1136
1146
} )
1137
1147
0 commit comments