Make 'undefined' assignable to 'void'
This commit is contained in:
parent
50d874e09d
commit
0a25bb58a4
1 changed files with 1 additions and 1 deletions
|
@ -5507,7 +5507,7 @@ namespace ts {
|
|||
|
||||
if (isTypeAny(target)) return Ternary.True;
|
||||
if (source.flags & TypeFlags.Undefined) {
|
||||
if (!strictNullChecks || target.flags & TypeFlags.Undefined || source === emptyArrayElementType) return Ternary.True;
|
||||
if (!strictNullChecks || target.flags & (TypeFlags.Undefined | TypeFlags.Void) || source === emptyArrayElementType) return Ternary.True;
|
||||
}
|
||||
if (source.flags & TypeFlags.Null) {
|
||||
if (!strictNullChecks || target.flags & TypeFlags.Null) return Ternary.True;
|
||||
|
|
Loading…
Reference in a new issue