fix(compiler-sfc): defineProps infer TSParenthesizedType (#4147)

This commit is contained in:
edison
2021-07-19 23:09:24 +08:00
committed by GitHub
parent 47ba33e27b
commit f7607d3a15
3 changed files with 9 additions and 3 deletions

View File

@@ -761,7 +761,8 @@ export default _defineComponent({
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
@@ -787,6 +788,7 @@ export default _defineComponent({
literalUnion: 'foo' | 'bar'
literalUnionMixed: 'foo' | 1 | boolean
intersection: Test & {}
foo: ((item: any) => boolean) | null
}, { expose }) {
expose()