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 Feb 11, 2023
1 parent 1d09540 commit ed80628
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 @@ -1976,15 +1976,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 ed80628

Please sign in to comment.