Skip to content

Use void as argument, sometimes error and sometimes no #32374

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

Closed
leonwangcn opened this issue Jul 12, 2019 · 3 comments
Closed

Use void as argument, sometimes error and sometimes no #32374

leonwangcn opened this issue Jul 12, 2019 · 3 comments
Labels
Unactionable There isn't something we can do with this issue

Comments

@leonwangcn
Copy link

`
function a(b: void) {

}
a();
`
There's an error here as follow:

  • TS2554: Expected 1 arguments, but got 0

How do I fix it, Thank you in advance!!!

@dragomirtitian
Copy link
Contributor

No error I can see Playground

There are limitations around void params and conditional types and generics but simple stuff should work (#29131)

@RyanCavanaugh RyanCavanaugh added the Unactionable There isn't something we can do with this issue label Jul 12, 2019
@leonwangcn
Copy link
Author

No error I can see Playground

There are limitations around void params and conditional types and generics but simple stuff should work (#29131)

but I get errors using webstorm
image

Is there a configuration problem?

@leonwangcn
Copy link
Author

No error I can see Playground

There are limitations around void params and conditional types and generics but simple stuff should work (#29131)

The reason is that my typescript version is too low, thank you very much

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Unactionable There isn't something we can do with this issue
Projects
None yet
Development

No branches or pull requests

3 participants