Migrate listDevices
Summary: _typescript_ Reviewed By: danielbuechele Differential Revision: D16764089 fbshipit-source-id: 03d980c354f8c03d7091fe01f82655e61c5854ff
This commit is contained in:
committed by
Facebook Github Bot
parent
93467193ad
commit
5c6ec866d6
15
src/utils/listDevices.tsx
Normal file
15
src/utils/listDevices.tsx
Normal 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);
|
||||
}
|
||||
Reference in New Issue
Block a user