You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/** * Returns the device list via Promise * * @returns {Promise<Device>} * @memberof RNSerialportStatic */getDeviceList(): Promise<Devices>;
However, when I see usage, the promise seems to be returning response object which tends to contain the devices object.
RNSerialport.getDeviceList((response)=>{if(!response.status){response.log("Error from getDeviceList()",response.errorCode+" "+response.errorMessage)return;}console.log(response.devices)//list});
Looking through the code, it's clearly returning the devices in its promise resolution and then returning only errorCode and errorMessage.
Could an interface for only those two be added to the typings and also the examples be fixed? Happy to help
The text was updated successfully, but these errors were encountered:
The typing for
getDeviceList
is as follows:However, when I see usage, the promise seems to be returning
response
object which tends to contain thedevices
object.Looking through the code, it's clearly returning the devices in its promise resolution and then returning only
errorCode
anderrorMessage
.Could an interface for only those two be added to the typings and also the examples be fixed? Happy to help
The text was updated successfully, but these errors were encountered: