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

E.sendOnly(e).foo(args), etc, should have void return type #2336

Open
erights opened this issue Jun 27, 2024 · 1 comment
Open

E.sendOnly(e).foo(args), etc, should have void return type #2336

erights opened this issue Jun 27, 2024 · 1 comment
Assignees

Comments

@erights
Copy link
Contributor

erights commented Jun 27, 2024

* @typedef {(...args: Parameters<T>) => Promise<void>} ESendOnlyCallable

says it returns a promise for void. But does it actually? AFAICT, it immediately returns only undefined and therefore should be declared as returning either void or undefined.

I noticed this when I got a @typescript-eslint/no-floating-promises lint error on the statement

 E.sendOnly(guestPingee).ping('sendOnly');
@erights
Copy link
Contributor Author

erights commented Jun 27, 2024

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

No branches or pull requests

2 participants