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

@@ -1646,6 +1646,8 @@ function inferRuntimeType(
}
return [`null`]
case 'TSParenthesizedType':
return inferRuntimeType(node.typeAnnotation, declaredTypes)
case 'TSUnionType':
return [
...new Set(
@@ -1654,7 +1656,6 @@ function inferRuntimeType(
) as any)
)
]
case 'TSIntersectionType':
return ['Object']