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:
Ron Buckton
2019-07-16 17:16:21 -07:00
committed by GitHub
parent b589020bb3
commit 049618f7da
14 changed files with 126 additions and 24 deletions

View File

@@ -24740,6 +24740,12 @@ namespace ts {
|| anyType;
}
const contextualReturnType = getContextualReturnType(func);
if (contextualReturnType) {
return getIterationTypeOfGeneratorFunctionReturnType(IterationTypeKind.Next, contextualReturnType, isAsync)
|| anyType;
}
return anyType;
}