Enable lint rules for Promise handling to discourage misuse of them. (#2607)
* Enable lint rules for Promise handling to discourage misuse of them. Squashed all of Hugh's commits into one. --------- Co-authored-by: Hugh Nimmo-Smith <hughns@element.io>
This commit is contained in:
@@ -11,11 +11,11 @@ Please see LICENSE in the repository root for full details.
|
||||
* @param devices The list of devices to search
|
||||
* @returns A matching media device or undefined if no matching device was found
|
||||
*/
|
||||
export async function findDeviceByName(
|
||||
export function findDeviceByName(
|
||||
deviceName: string,
|
||||
kind: MediaDeviceKind,
|
||||
devices: MediaDeviceInfo[],
|
||||
): Promise<string | undefined> {
|
||||
): string | undefined {
|
||||
const deviceInfo = devices.find(
|
||||
(d) => d.kind === kind && d.label === deviceName,
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user