Fixed bug that led to a confusing hover type for the return result of an async generator function. This addresses #5411. (#5468)

Co-authored-by: Eric Traut <erictr@microsoft.com>
This commit is contained in:
Eric Traut 2023-07-12 00:22:35 +02:00 committed by GitHub
parent 72491ca691
commit f9796dd5cd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -16919,6 +16919,7 @@ export function createTypeEvaluator(importLookup: ImportLookup, evaluatorOptions
// Note that the inferred type, once lazily computed, needs to wrap the
// resulting type in an awaitable.
functionType.details.flags |= FunctionTypeFlags.WrapReturnTypeInAwait;
awaitableFunctionType.details.flags |= FunctionTypeFlags.WrapReturnTypeInAwait;
return awaitableFunctionType;