mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-29 16:29:19 -05:00
Get contextual type of yield from contextual signature of containing function (#32433)
* Get contextual type of yield from contextual signature of containing function * Add missing baseline
This commit is contained in:
@@ -24740,6 +24740,12 @@ namespace ts {
|
||||
|| anyType;
|
||||
}
|
||||
|
||||
const contextualReturnType = getContextualReturnType(func);
|
||||
if (contextualReturnType) {
|
||||
return getIterationTypeOfGeneratorFunctionReturnType(IterationTypeKind.Next, contextualReturnType, isAsync)
|
||||
|| anyType;
|
||||
}
|
||||
|
||||
return anyType;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user