'use strict';

import {
  Platform,
  NativeModules
} from 'react-native';
import UsbSerialDevice from './UsbSerialDevice';

const UsbSerialModule = NativeModules.UsbSerial;

class UsbSerial {
    constructor() {

        if (Platform.OS != 'android') {
            throw 'Unfortunately only android is supported';
        }
    }

    getDeviceListAsync() {
        return UsbSerialModule.getDeviceListAsync();
    }

    openDeviceAsync(deviceObject = {}) {
        return UsbSerialModule.openDeviceAsync(deviceObject).then((usbSerialDevNativeObject) => {
            return new UsbSerialDevice(UsbSerialModule, usbSerialDevNativeObject);
        });
    }
}

module.exports = UsbSerial;

@@ -168,16 +168,23 @@
 erial;%0A%0A
+export 
 class Us
@@ -213,17 +213,16 @@
 tor() %7B%0A
-%0A
         
@@ -665,32 +665,4 @@
 %0A%7D%0A%0A
-module.exports = UsbSerial;%0A

Fix export