Skip to content

Commit

Permalink
fix self-check
Browse files Browse the repository at this point in the history
  • Loading branch information
Andarist committed Dec 20, 2024
1 parent 1a8f1cc commit 655602d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/compiler/checker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18112,12 +18112,12 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
// reduced we'll never reduce again, so this occurs at most once.
result = getIntersectionType(typeSet, flags, aliasSymbol, aliasTypeArguments);
}
else if (every(typeSet, t => !!(t.flags & TypeFlags.Union && (t as UnionType).types[0].flags & TypeFlags.Undefined))) {
else if (every(typeSet, (t): boolean => !!(t.flags & TypeFlags.Union && (t as UnionType).types[0].flags & TypeFlags.Undefined))) {
const containedUndefinedType = some(typeSet, containsMissingType) ? missingType : undefinedType;
removeFromEach(typeSet, TypeFlags.Undefined);
result = getUnionType([getIntersectionType(typeSet, flags), containedUndefinedType], UnionReduction.Literal, aliasSymbol, aliasTypeArguments);
}
else if (every(typeSet, t => !!(t.flags & TypeFlags.Union && ((t as UnionType).types[0].flags & TypeFlags.Null || (t as UnionType).types[1].flags & TypeFlags.Null)))) {
else if (every(typeSet, (t): boolean => !!(t.flags & TypeFlags.Union && ((t as UnionType).types[0].flags & TypeFlags.Null || (t as UnionType).types[1].flags & TypeFlags.Null)))) {
removeFromEach(typeSet, TypeFlags.Null);
result = getUnionType([getIntersectionType(typeSet, flags), nullType], UnionReduction.Literal, aliasSymbol, aliasTypeArguments);
}
Expand Down Expand Up @@ -18434,7 +18434,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
}
newTexts.push(text);
if (every(newTexts, t => t === "")) {
if (every(newTypes, t => !!(t.flags & TypeFlags.String))) {
if (every(newTypes, (t): boolean => !!(t.flags & TypeFlags.String))) {
return stringType;
}
// Normalize `${Mapping<xxx>}` into Mapping<xxx>
Expand Down

0 comments on commit 655602d

Please sign in to comment.