Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Type 'AsyncGenerator<awaited a, awaited a, unknown>' is not assignable to type 'AsyncGenerator<a, a, unknown>'. #37603

Closed
falsandtru opened this issue Mar 25, 2020 · 0 comments · Fixed by #37610

Comments

@falsandtru
Copy link
Contributor

TypeScript Version: 3.7.x-dev.20200324

Search Terms:

Code

function g<a>(a: a): AsyncGenerator<a, a> {
  return async function* (): AsyncGenerator<awaited a, awaited a> {
    yield a;
    return a;
  }();
}

Expected behavior:
pass
Actual behavior:
Type 'AsyncGenerator<awaited a, awaited a, unknown>' is not assignable to type 'AsyncGenerator<a, a, unknown>'.
Playground Link:

Related Issues:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant