literalUnionNumber: { type: Number, required: true },
literalUnionMixed: { type: [String, Number, Boolean], required: true },
intersection: { type: Object, required: true },
+ intersection2: { type: String, required: true },
foo: { type: [Function, null], required: true }
},
setup(__props: any, { expose }) {
literalUnionNumber: 1 | 2 | 3 | 4 | 5
literalUnionMixed: 'foo' | 1 | boolean
intersection: Test & {}
+ intersection2: 'foo' & ('foo' | 'bar')
foo: ((item: any) => boolean) | null
}>()
</script>`)
`literalUnionMixed: { type: [String, Number, Boolean], required: true }`
)
expect(content).toMatch(`intersection: { type: Object, required: true }`)
+ expect(content).toMatch(`intersection2: { type: String, required: true }`)
expect(content).toMatch(`foo: { type: [Function, null], required: true }`)
expect(bindings).toStrictEqual({
string: BindingTypes.PROPS,
literalUnionNumber: BindingTypes.PROPS,
literalUnionMixed: BindingTypes.PROPS,
intersection: BindingTypes.PROPS,
+ intersection2: BindingTypes.PROPS,
foo: BindingTypes.PROPS
})
})
case 'TSParenthesizedType':
return inferRuntimeType(node.typeAnnotation, declaredTypes)
case 'TSUnionType':
+ case 'TSIntersectionType':
return [
...new Set(
[].concat(
)
)
]
- case 'TSIntersectionType':
- return ['Object']
case 'TSSymbolKeyword':
return ['Symbol']