Skip to content

Commit 8e76d16

Browse files
naive perf change
1 parent b478765 commit 8e76d16

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/compiler/checker.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -16939,7 +16939,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
1693916939
if (includes & (TypeFlags.Enum | TypeFlags.Literal | TypeFlags.UniqueESSymbol | TypeFlags.TemplateLiteral | TypeFlags.StringMapping) || includes & TypeFlags.Void && includes & TypeFlags.Undefined) {
1694016940
removeRedundantLiteralTypes(typeSet, includes, !!(unionReduction & UnionReduction.Subtype));
1694116941
}
16942-
if (includes & TypeFlags.StringLiteral && includes & TypeFlags.TemplateLiteral) {
16942+
if (unionReduction === UnionReduction.Subtype && (includes & TypeFlags.StringLiteral && includes & TypeFlags.TemplateLiteral)) {
1694316943
removeStringLiteralsMatchedByTemplateLiterals(typeSet);
1694416944
}
1694516945
if (unionReduction === UnionReduction.Subtype) {

0 commit comments

Comments
 (0)