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 Jan 26, 2023
1 parent 0fbc19f commit 958bbff
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 @@ -1967,15 +1967,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 958bbff

Please sign in to comment.