Remove unnecessary ts-ignore for archive

Summary:
This is a pretty broad ignore which doesn't seem required
but could hide real bugs.

Reviewed By: jknoxville

Differential Revision: D17342033

fbshipit-source-id: c7941e383936e44e39eff3fb7eced1d85a0d6417
This commit is contained in:
Pascal Hartig
2019-09-12 08:03:15 -07:00
committed by Facebook Github Bot
parent 64373aac0a
commit e25c1e7aaf

View File

@@ -7,8 +7,17 @@
import BaseDevice from './BaseDevice';
import {DeviceType, OS, DeviceShell, DeviceLogEntry} from './BaseDevice';
function normalizeArchivedDeviceType(deviceType: DeviceType): DeviceType {
let archivedDeviceType = deviceType;
if (archivedDeviceType === 'emulator') {
archivedDeviceType = 'archivedEmulator';
} else if (archivedDeviceType === 'physical') {
archivedDeviceType = 'archivedPhysical';
}
return archivedDeviceType;
}
export default class ArchivedDevice extends BaseDevice {
// @ts-ignore: Super needs to be on the first line
constructor(
serial: string,
deviceType: DeviceType,
@@ -16,13 +25,7 @@ export default class ArchivedDevice extends BaseDevice {
os: OS,
logEntries: Array<DeviceLogEntry>,
) {
let archivedDeviceType = deviceType;
if (archivedDeviceType === 'emulator') {
archivedDeviceType = 'archivedEmulator';
} else if (archivedDeviceType === 'physical') {
archivedDeviceType = 'archivedPhysical';
}
super(serial, archivedDeviceType, title, os);
super(serial, normalizeArchivedDeviceType(deviceType), title, os);
this.logs = logEntries;
}