Migrate the iOSDevice from js to tsx

Summary: As per the title.

Reviewed By: jknoxville

Differential Revision: D16668086

fbshipit-source-id: c246fcaf117802cf1d3c6b3959bf0d0c2761fdce
This commit is contained in:
Pritesh Nandgaonkar
2019-08-09 07:47:34 -07:00
committed by Facebook Github Bot
parent eb26a74327
commit f408f3f949
4 changed files with 23 additions and 25 deletions

View File

@@ -5,41 +5,39 @@
* @format
*/
import type {DeviceType, LogLevel, DeviceLogEntry} from './BaseDevice.tsx';
import {DeviceType, LogLevel, DeviceLogEntry} from './BaseDevice';
import child_process from 'child_process';
import BaseDevice from './BaseDevice.tsx';
import BaseDevice from './BaseDevice';
import JSONStream from 'JSONStream';
import {Transform} from 'stream';
type IOSLogLevel = 'Default' | 'Info' | 'Debug' | 'Error' | 'Fault';
type RawLogEntry = {|
eventMessage: string,
machTimestamp: number,
messageType: IOSLogLevel,
processID: number,
processImagePath: string,
processImageUUID: string,
processUniqueID: number,
senderImagePath: string,
senderImageUUID: string,
senderProgramCounter: number,
threadID: number,
timestamp: string,
timezoneName: string,
traceID: string,
|};
type RawLogEntry = {
eventMessage: string;
machTimestamp: number;
messageType: IOSLogLevel;
processID: number;
processImagePath: string;
processImageUUID: string;
processUniqueID: number;
senderImagePath: string;
senderImageUUID: string;
senderProgramCounter: number;
threadID: number;
timestamp: string;
timezoneName: string;
traceID: string;
};
export default class IOSDevice extends BaseDevice {
icon = 'icons/ios.svg';
os = 'iOS';
log: any;
buffer: string;
constructor(serial: string, deviceType: DeviceType, title: string) {
super(serial, deviceType, title);
this.icon = 'icons/ios.svg';
this.os = 'iOS';
this.buffer = '';
this.log = this.startLogListener();
}