Template literals and string mappings have 'string' as base type
This commit is contained in:
parent
4fca1e1fcd
commit
26a626d045
|
@ -20747,7 +20747,7 @@ namespace ts {
|
|||
|
||||
function getBaseTypeOfLiteralType(type: Type): Type {
|
||||
return type.flags & TypeFlags.EnumLiteral ? getBaseTypeOfEnumLiteralType(type as LiteralType) :
|
||||
type.flags & TypeFlags.StringLiteral ? stringType :
|
||||
type.flags & (TypeFlags.StringLiteral | TypeFlags.TemplateLiteral | TypeFlags.StringMapping) ? stringType :
|
||||
type.flags & TypeFlags.NumberLiteral ? numberType :
|
||||
type.flags & TypeFlags.BigIntLiteral ? bigintType :
|
||||
type.flags & TypeFlags.BooleanLiteral ? booleanType :
|
||||
|
|
Loading…
Reference in a new issue