Skip to content

Commit 6093491

Browse files
authoredOct 22, 2022
Fix apparent typo in getStringMappingType (#51248)
1 parent 61c2609 commit 6093491

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
@@ -15709,7 +15709,7 @@ namespace ts {
1570915709
type.flags & TypeFlags.TemplateLiteral ? getTemplateLiteralType(...applyTemplateStringMapping(symbol, (type as TemplateLiteralType).texts, (type as TemplateLiteralType).types)) :
1571015710
// Mapping<Mapping<T>> === Mapping<T>
1571115711
type.flags & TypeFlags.StringMapping && symbol === type.symbol ? type :
15712-
type.flags & (TypeFlags.Any | TypeFlags.String || type.flags & TypeFlags.StringMapping) || isGenericIndexType(type) ? getStringMappingTypeForGenericType(symbol, type) :
15712+
type.flags & (TypeFlags.Any | TypeFlags.String | TypeFlags.StringMapping) || isGenericIndexType(type) ? getStringMappingTypeForGenericType(symbol, type) :
1571315713
// This handles Mapping<`${number}`> and Mapping<`${bigint}`>
1571415714
isPatternLiteralPlaceholderType(type) ? getStringMappingTypeForGenericType(symbol, getTemplateLiteralType(["", ""], [type])) :
1571515715
type;

0 commit comments

Comments
 (0)