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

Topic publish has invalid return signature #150

Open
CrispyBacon1999 opened this issue Mar 4, 2024 · 2 comments
Open

Topic publish has invalid return signature #150

CrispyBacon1999 opened this issue Mar 4, 2024 · 2 comments

Comments

@CrispyBacon1999
Copy link
Contributor

The return signature for topic.publish() implies that it will always return a promise, but this line allows it to return undefined. Might be worth replacing it with return Promise.resolve() instead?

@cjlawson02
Copy link
Owner

Promise<void> is returned if you have something like

async myFunc() {
  return;
}

@CrispyBacon1999
Copy link
Contributor Author

Hmm, that's not what I experienced when running tests that use that code... https://github.com/CrispyBacon1999/ntcore-react/actions/runs/8146634551/job/22265567902

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