mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-19 20:37:00 -05:00
'null' and 'undefined' are bottom types in non-strictNullChecks mode
This commit is contained in:
@@ -8592,6 +8592,9 @@ namespace ts {
|
||||
if (includes & TypeFlags.Any) {
|
||||
return includes & TypeFlags.Wildcard ? wildcardType : anyType;
|
||||
}
|
||||
if (!strictNullChecks && includes & TypeFlags.Nullable) {
|
||||
return includes & TypeFlags.Undefined ? undefinedType : nullType;
|
||||
}
|
||||
if (includes & TypeFlags.String && includes & TypeFlags.StringLiteral ||
|
||||
includes & TypeFlags.Number && includes & TypeFlags.NumberLiteral ||
|
||||
includes & TypeFlags.ESSymbol && includes & TypeFlags.UniqueESSymbol) {
|
||||
|
||||
Reference in New Issue
Block a user