diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index cadf4edcdcd..33f39293b7e 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -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) {