Skip to content

Commit ccba128

Browse files
committed
Use correct base primitive type
1 parent 0b24f02 commit ccba128

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
@@ -18842,7 +18842,7 @@ namespace ts {
1884218842
// If the type parameter is constrained to the base primitive type we're checking for,
1884318843
// consider this a literal context. For example, given a type parameter 'T extends string',
1884418844
// this causes us to infer string literal types for T.
18845-
if (constraint.flags & (TypeFlags.String | TypeFlags.Number | TypeFlags.Boolean | TypeFlags.Enum | TypeFlags.Symbol)) {
18845+
if (constraint.flags & (TypeFlags.String | TypeFlags.Number | TypeFlags.Boolean | TypeFlags.Enum | TypeFlags.ESSymbol)) {
1884618846
return true;
1884718847
}
1884818848
contextualType = constraint;

0 commit comments

Comments
 (0)