Revert D16648356: Migration of Basedevice from js to tsx

Differential Revision:
D16648356

Original commit changeset: 12954532acf9

fbshipit-source-id: 76754f427e7ccac0f0b0030c3a0af02d036c1a8b
This commit is contained in:
Pascal Hartig
2019-08-06 08:45:50 -07:00
committed by Facebook Github Bot
parent 3b31e54b6e
commit 6a43b0cc88
30 changed files with 46 additions and 45 deletions

View File

@@ -5,12 +5,12 @@
* @format
*/
import type {DeviceType, DeviceShell} from './BaseDevice.tsx';
import type {DeviceType, DeviceShell} from './BaseDevice.js';
import {Priority} from 'adbkit-logcat-fb';
import child_process from 'child_process';
import child_process_promise from 'child-process-es6-promise';
import BaseDevice from './BaseDevice.tsx';
import BaseDevice from './BaseDevice.js';
import ArchivedDevice from './ArchivedDevice.js';
type ADBClient = any;

View File

@@ -4,13 +4,13 @@
* LICENSE file in the root directory of this source tree.
* @format
*/
import BaseDevice from './BaseDevice.tsx';
import BaseDevice from './BaseDevice.js';
import type {
DeviceType,
OS,
DeviceShell,
DeviceLogEntry,
} from './BaseDevice.tsx';
} from './BaseDevice.js';
export default class ArchivedDevice extends BaseDevice {
constructor(

View File

@@ -5,7 +5,8 @@
* @format
*/
import stream from 'stream';
import type stream from 'stream';
import type ArchivedDevice from './ArchivedDevice';
export type LogLevel =
| 'unknown'
@@ -16,7 +17,7 @@ export type LogLevel =
| 'error'
| 'fatal';
export type DeviceLogEntry = {
export type DeviceLogEntry = {|
date: Date,
pid: number,
tid: number,
@@ -24,7 +25,7 @@ export type DeviceLogEntry = {
type: LogLevel,
tag: string,
message: string,
};
|};
export type DeviceShell = {
stdout: stream.Readable,
@@ -40,13 +41,13 @@ export type DeviceType =
| 'archivedEmulator'
| 'archivedPhysical';
export type DeviceExport = {
export type DeviceExport = {|
os: string,
title: string,
deviceType: DeviceType,
serial: string,
logs: Array<DeviceLogEntry>,
};
|};
export type OS = 'iOS' | 'Android' | 'Windows' | 'MacOS';
@@ -70,7 +71,7 @@ export default class BaseDevice {
serial: string;
// possible src of icon to display next to the device title
icon: string | null | undefined;
icon: ?string;
logListeners: Map<Symbol, DeviceLogListener> = new Map();
logEntries: Array<DeviceLogEntry> = [];
@@ -134,7 +135,7 @@ export default class BaseDevice {
this.logListeners.delete(id);
}
spawnShell(): DeviceShell | null | undefined {
spawnShell(): ?DeviceShell {
throw new Error('unimplemented');
}
@@ -142,7 +143,7 @@ export default class BaseDevice {
throw new Error('unimplemented');
}
archive(): any | null | undefined {
archive(): ?ArchivedDevice {
return null;
}
}

View File

@@ -5,9 +5,9 @@
* @format
*/
import type {DeviceType, LogLevel, DeviceLogEntry} from './BaseDevice.tsx';
import type {DeviceType, LogLevel, DeviceLogEntry} from './BaseDevice.js';
import child_process from 'child_process';
import BaseDevice from './BaseDevice.tsx';
import BaseDevice from './BaseDevice.js';
import JSONStream from 'JSONStream';
import {Transform} from 'stream';

View File

@@ -5,7 +5,7 @@
* @format
*/
import BaseDevice from './BaseDevice.tsx';
import BaseDevice from './BaseDevice.js';
export default class MacDevice extends BaseDevice {
os = 'MacOS';

View File

@@ -5,7 +5,7 @@
* @format
*/
import BaseDevice from './BaseDevice.tsx';
import BaseDevice from './BaseDevice.js';
export default class WindowsDevice extends BaseDevice {
os = 'Windows';