fix(defineProps): defineProps generates unnecessary array of same types (#4353)

fix #4352
This commit is contained in:
webfansplz
2021-08-17 05:40:00 +08:00
committed by GitHub
parent 77223df2d2
commit ad66295cb3
3 changed files with 9 additions and 8 deletions

View File

@@ -790,7 +790,8 @@ export default _defineComponent({
alias: { type: Array, required: true },
method: { type: Function, required: true },
union: { type: [String, Number], required: true },
literalUnion: { type: [String, String], required: true },
literalUnion: { type: String, required: true },
literalUnionNumber: { type: Number, required: true },
literalUnionMixed: { type: [String, Number, Boolean], required: true },
intersection: { type: Object, required: true },
foo: { type: [Function, null], required: true }
@@ -817,6 +818,7 @@ export default _defineComponent({
union: string | number
literalUnion: 'foo' | 'bar'
literalUnionNumber: 1 | 2 | 3 | 4 | 5
literalUnionMixed: 'foo' | 1 | boolean
intersection: Test & {}
foo: ((item: any) => boolean) | null