union: { type: [String, Number], required: true },
literalUnion: { type: [String, String], required: true },
literalUnionMixed: { type: [String, Number, Boolean], required: true },
- intersection: { type: Object, required: true }
+ intersection: { type: Object, required: true },
+ foo: { type: [Function, null], required: true }
} as unknown as undefined,
setup(__props: {
string: string
literalUnion: 'foo' | 'bar'
literalUnionMixed: 'foo' | 1 | boolean
intersection: Test & {}
+ foo: ((item: any) => boolean) | null
}, { expose }) {
expose()
literalUnion: 'foo' | 'bar'
literalUnionMixed: 'foo' | 1 | boolean
intersection: Test & {}
+ foo: ((item: any) => boolean) | null
}>()
</script>`)
assertCode(content)
`literalUnionMixed: { type: [String, Number, Boolean], required: true }`
)
expect(content).toMatch(`intersection: { type: Object, required: true }`)
+ expect(content).toMatch(`foo: { type: [Function, null], required: true }`)
expect(bindings).toStrictEqual({
string: BindingTypes.PROPS,
number: BindingTypes.PROPS,
union: BindingTypes.PROPS,
literalUnion: BindingTypes.PROPS,
literalUnionMixed: BindingTypes.PROPS,
- intersection: BindingTypes.PROPS
+ intersection: BindingTypes.PROPS,
+ foo: BindingTypes.PROPS
})
})