@@ -30840,16 +30840,17 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
30840
30840
contextualReturnType = filterType(contextualReturnType, type => !!getIterationTypeOfGeneratorFunctionReturnType(IterationTypeKind.Return, type, isAsyncGenerator));
30841
30841
}
30842
30842
if (node.asteriskToken) {
30843
- const iterationTypes = getIterationTypesOfGeneratorFunctionReturnType(contextualReturnType, isAsyncGenerator);
30844
- const yieldType = iterationTypes?.yieldType ?? silentNeverType;
30845
- const returnType = getContextualType(node, contextFlags) ?? silentNeverType;
30846
- const nextType = iterationTypes?.nextType ?? unknownType;
30847
- const generatorType = createGeneratorType(yieldType, returnType, nextType, /*isAsyncGenerator*/ false);
30848
- if (isAsyncGenerator) {
30849
- const asyncGeneratorType = createGeneratorType(yieldType, returnType, nextType, /*isAsyncGenerator*/ true);
30850
- return getUnionType([generatorType, asyncGeneratorType]);
30851
- }
30852
- return generatorType;
30843
+ // const iterationTypes = getIterationTypesOfGeneratorFunctionReturnType(contextualReturnType, isAsyncGenerator);
30844
+ // const yieldType = iterationTypes?.yieldType ?? silentNeverType;
30845
+ // const returnType = getContextualType(node, contextFlags) ?? silentNeverType;
30846
+ // const nextType = iterationTypes?.nextType ?? unknownType;
30847
+ // const generatorType = createGeneratorType(yieldType, returnType, nextType, /*isAsyncGenerator*/ false);
30848
+ // if (isAsyncGenerator) {
30849
+ // const asyncGeneratorType = createGeneratorType(yieldType, returnType, nextType, /*isAsyncGenerator*/ true);
30850
+ // return getUnionType([generatorType, asyncGeneratorType]);
30851
+ // }
30852
+ // return generatorType;
30853
+ return contextualReturnType;
30853
30854
}
30854
30855
return getIterationTypeOfGeneratorFunctionReturnType(IterationTypeKind.Yield, contextualReturnType, isAsyncGenerator);
30855
30856
}
0 commit comments