Skip to content

Commit

Permalink
Removed unnecessary normalize call
Browse files Browse the repository at this point in the history
  • Loading branch information
daanboer committed May 28, 2022
1 parent 06c7d10 commit b186860
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/Utils/isAssignableTo.ts
Expand Up @@ -196,12 +196,7 @@ export function isAssignableTo(
const targetMembers = getObjectProperties(target);
if (targetMembers.length === 0) {
// When target object is empty then anything except null and undefined can be assigned to it
return !isAssignableTo(
new UnionType([new UndefinedType(), new NullType()]).normalize(),
source,
inferMap,
insideTypes
);
return !isAssignableTo(new UnionType([new UndefinedType(), new NullType()]), source, inferMap, insideTypes);
} else if (source instanceof ObjectType) {
const sourceMembers = getObjectProperties(source);

Expand Down

0 comments on commit b186860

Please sign in to comment.