Skip to content

Commit

Permalink
Fix infinite loop
Browse files Browse the repository at this point in the history
Resolves #2468
  • Loading branch information
Gerrit0 committed Jan 1, 2024
1 parent 3e2240c commit 914f9bb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
@@ -1,5 +1,9 @@
# Unreleased

### Bug Fixes

- Fixed infinite loop caused by a fix for some complicated union/intersection types, #2468.

## v0.25.5 (2024-01-01)

## Features
Expand Down
4 changes: 3 additions & 1 deletion src/lib/converter/types.ts
Expand Up @@ -135,10 +135,12 @@ export function convertType(
// TS 4.2 added this to enable better tracking of type aliases.
// We need to check it here, not just in the union checker, because typeToTypeNode
// will use the origin when serializing
// aliasSymbol check is important - #2468
if (
typeOrNode.isUnion() &&
typeOrNode.origin &&
!typeOrNode.origin.isUnion()
!typeOrNode.origin.isUnion() &&
!typeOrNode.aliasSymbol
) {
return convertType(context, typeOrNode.origin);
}
Expand Down

0 comments on commit 914f9bb

Please sign in to comment.