Use 'true' and 'false' types when contextual type is 'boolean'
This commit is contained in:
parent
aee1bf6429
commit
5c11d4c349
1 changed files with 1 additions and 1 deletions
|
@ -13467,7 +13467,7 @@ namespace ts {
|
|||
return maybeTypeOfKind(contextualType, (TypeFlags.NumberLiteral | TypeFlags.EnumLiteral));
|
||||
}
|
||||
if (type.flags & TypeFlags.Boolean) {
|
||||
return maybeTypeOfKind(contextualType, TypeFlags.BooleanLiteral) && !isTypeAssignableTo(booleanType, contextualType);
|
||||
return maybeTypeOfKind(contextualType, TypeFlags.BooleanLiteral);
|
||||
}
|
||||
if (type.flags & TypeFlags.Enum) {
|
||||
return typeContainsLiteralFromEnum(contextualType, <EnumType>type);
|
||||
|
|
Loading…
Reference in a new issue