( storedConnections: Connection[], connection: Connection, )
| 9 | } |
| 10 | |
| 11 | function getIndexOfConnection( |
| 12 | storedConnections: Connection[], |
| 13 | connection: Connection, |
| 14 | ): number { |
| 15 | const connectionInStore = storedConnections.find( |
| 16 | (c) => c.id === connection.id, |
| 17 | ); |
| 18 | if (!connectionInStore) { |
| 19 | return -1; |
| 20 | } |
| 21 | return storedConnections.indexOf(connectionInStore); |
| 22 | } |
| 23 | |
| 24 | export async function getStoredConnection( |
| 25 | id: number, |
no outgoing calls
no test coverage detected