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

Return type of "async () => {}" is displayed as "void" #77

Closed
kasugaiasuka opened this issue Nov 9, 2021 · 3 comments
Closed

Return type of "async () => {}" is displayed as "void" #77

kasugaiasuka opened this issue Nov 9, 2021 · 3 comments
Labels
bug Something isn't working

Comments

@kasugaiasuka
Copy link

kasugaiasuka commented Nov 9, 2021

There seems to be something wrong with the handling of async function objects.

Steps to Reproduce

  1. Write the following code.
  2. Open the ts-type-expand panel.
  3. Point foo.
const foo = async () => { };

Expected
ts-type-expand displays the return type of foo as Promise<void>.

Actual
It displays this type as void.

Additional info
const bar= async (): Promise<void> => { }; will be displayed as any.

@d-kimuson d-kimuson added the bug Something isn't working label Nov 10, 2021
@d-kimuson
Copy link
Owner

Thanks for the report !
I was able to reproduce it by trying it in my environment. I'll fix it.

@d-kimuson
Copy link
Owner

fixed in #99

@d-kimuson
Copy link
Owner

#99 merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants