mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-03-15 14:05:47 -05:00
Update LKG
This commit is contained in:
@@ -21958,11 +21958,10 @@ var ts;
|
||||
inferFromTypes(source, t);
|
||||
}
|
||||
}
|
||||
// Next, if target is a union type containing a single naked type parameter, make a
|
||||
// secondary inference to that type parameter. We don't do this for intersection types
|
||||
// because in a target type like Foo & T we don't know how which parts of the source type
|
||||
// should be matched by Foo and which should be inferred to T.
|
||||
if (target.flags & 16384 /* Union */ && typeParameterCount === 1) {
|
||||
// Next, if target containings a single naked type parameter, make a secondary inference to that type
|
||||
// parameter. This gives meaningful results for union types in co-variant positions and intersection
|
||||
// types in contra-variant positions (such as callback parameters).
|
||||
if (typeParameterCount === 1) {
|
||||
inferiority++;
|
||||
inferFromTypes(source, typeParameter);
|
||||
inferiority--;
|
||||
|
||||
Reference in New Issue
Block a user