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
Current behavior:
StarPrnt print methods and openCashDrawer have port argument typed to string. Attempting to pass a potentially null value throws a compile error in TypeScript environments.
Expected behavior:
These methods should (as noted in their comments) accept null values, which means: use the connected printer
Steps to reproduce:
Set up a typescript application and pass null or a null|string type variable for the port to openCashDrawer and/or any of the print methods. Compile the application and see a type error for the method about expecting a string.
Other information:
I've confirmed the change in the PR resolves the issue and correctly uses the connected printer when given a null port. Thanks for your attention and maintenance of this project.
Ionic info: (run ionic info from a terminal/cmd prompt and paste output below):
I'm submitting a ... (check one with "x")
[x] bug report
[ ] feature request
[ ] support request => Please do not submit support requests here, use one of these channels: https://forum.ionicframework.com/ or https://ionicworldwide.herokuapp.com/
Current behavior:
StarPrnt
print
methods andopenCashDrawer
haveport
argument typed to string. Attempting to pass a potentially null value throws a compile error in TypeScript environments.Expected behavior:
These methods should (as noted in their comments) accept null values, which means: use the connected printer
Steps to reproduce:
Set up a typescript application and pass
null
or anull|string
type variable for theport
toopenCashDrawer
and/or any of theprint
methods. Compile the application and see a type error for the method about expecting a string.Related code:
See related PR: #4095
Other information:
I've confirmed the change in the PR resolves the issue and correctly uses the connected printer when given a null port. Thanks for your attention and maintenance of this project.
Ionic info: (run
ionic info
from a terminal/cmd prompt and paste output below):The text was updated successfully, but these errors were encountered: