mirror of
https://github.com/pybricks/pybricks-code.git
synced 2026-09-14 18:46:17 +00:00
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:
+1
-4
@@ -63,10 +63,7 @@ import { BleConnectionState } from './reducers';
|
||||
|
||||
const decoder = new TextDecoder();
|
||||
|
||||
function handleDisconnect(
|
||||
server: BluetoothRemoteGATTServer,
|
||||
_action: ReturnType<typeof disconnect>,
|
||||
): void {
|
||||
function handleDisconnect(server: BluetoothRemoteGATTServer): void {
|
||||
server.disconnect();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user