actions: simplify usage of Matchable

This removes use of the pseudo-internal toString() function and also
removes extraneous uses of ReturnType<>. Also, a new when() method
is added to simplify additional uses.
This commit is contained in:
David Lechner
2022-02-26 12:43:10 -06:00
parent 3cbfc4ca68
commit a9f4eaa32d
13 changed files with 125 additions and 142 deletions
+2 -3
View File
@@ -57,9 +57,8 @@ function* encodeRequest(): Generator {
}
const { failedToSend } = yield* race({
sent: take<ReturnType<typeof didWriteCommand>>(didWriteCommand),
failedToSend:
take<ReturnType<typeof didFailToWriteCommand>>(didFailToWriteCommand),
sent: take(didWriteCommand),
failedToSend: take(didFailToWriteCommand),
});
if (failedToSend) {