cjlawson02 / ntcore-ts-client

A TypeScript library for WPILib's NT4.1 spec
https://ntcore.chrislawson.dev
22 stars 7 forks source link

Topic publish has invalid return signature #150

Open CrispyBacon1999 opened 4 months ago

CrispyBacon1999 commented 4 months ago

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 commented 4 months ago

Promise<void> is returned if you have something like

async myFunc() {
  return;
}
CrispyBacon1999 commented 4 months ago

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