endojs / endo

Endo is a distributed secure JavaScript sandbox, based on SES
Apache License 2.0
761 stars 68 forks source link

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

Open erights opened 6 days ago

erights commented 6 days ago

https://github.com/endojs/endo/blob/7a2955080f34880c8028e1b2dff06bf7b969790f/packages/eventual-send/src/E.js#L299

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 commented 6 days ago

@michaelfig , same problem at https://github.com/Agoric/agoric-sdk/blob/cbe061cdb847d99ea435c26131709527b40a1ce5/packages/vow/src/E.js#L354 ?