Migrate listDevices

Summary: _typescript_

Reviewed By: danielbuechele

Differential Revision: D16764089

fbshipit-source-id: 03d980c354f8c03d7091fe01f82655e61c5854ff
This commit is contained in:
Pascal Hartig
2019-08-13 08:19:52 -07:00
committed by Facebook Github Bot
parent 93467193ad
commit 5c6ec866d6
2 changed files with 5 additions and 5 deletions

15
src/utils/listDevices.tsx Normal file
View File

@@ -0,0 +1,15 @@
/**
* Copyright 2018-present Facebook.
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
* @format
*/
import {getActiveAndroidDevices} from '../dispatcher/androidDevice';
import {getActiveDevicesAndSimulators} from '../dispatcher/iOSDevice';
import BaseDevice from '../devices/BaseDevice';
export async function listDevices(): Promise<Array<BaseDevice>> {
const androidDevices = await getActiveAndroidDevices();
const iOSDevices: BaseDevice[] = await getActiveDevicesAndSimulators();
return iOSDevices.concat(androidDevices);
}