react-native-esc-pos-printer
react-native-esc-pos-printer copied to clipboard
Incorrect return type of printing.send() when using multiple printers
I am developing an Android app using the library with version 2.3.0, the return types are different when I run the following code. Is it normal?
Source 1:
printing.initialize().text("hello, is it me you're looking for").send();
return type:
`interface IMonitorStatus {
connection: string; online: string; coverOpen: string; paper: string; paperFeed: string; panelSwitch: string; drawer: string; errorStatus: string; autoRecoverErr: string; adapter: string; batteryLevel: string; }: `
Source 2 (Multiple printers):
printing.initialize().text("hello, is it me you're looking for").send({target});
Return type:
result: string;
e.g. 'PRINT_SUCCESS'
@ipa127001 if you are using instantiate method then i think it would return you success message . But if you use init method to initialize the printer then it returns an object containing properties like connection, online etc
@ipa127001 if you are using
instantiatemethod then i think it would return you success message . But if you useinitmethod to initialize the printer then it returns an object containing properties like connection, online etc
I think you have told me the "fact" after called the 2 methods. However, I want to know why the 2 results are different. The document does not mention for this change and the status actually helps us to know the print is success or not.
@ipa127001 got it. I've already opened an issue to get to know about the error/result messages description which is not mentioned in the library documentation.
Let me know if you get something.
Resolved in 4.0.0