Skip to content

Commit

Permalink
fix(compiler-sfc): infer TSIntersectionType
Browse files Browse the repository at this point in the history
  • Loading branch information
sxzz committed Dec 22, 2022
1 parent fe77e2b commit ba34127
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions packages/compiler-sfc/src/compileScript.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1968,15 +1968,14 @@ function inferRuntimeType(
case 'TSParenthesizedType':
return inferRuntimeType(node.typeAnnotation, declaredTypes)
case 'TSUnionType':
case 'TSIntersectionType':
return [
...new Set(
[].concat(
...(node.types.map(t => inferRuntimeType(t, declaredTypes)) as any)
)
)
]
case 'TSIntersectionType':
return ['Object']

case 'TSSymbolKeyword':
return ['Symbol']
Expand Down

0 comments on commit ba34127

Please sign in to comment.