auctifera-josed / starprnt

Cordova plugin for the Star micronics printers
MIT License
40 stars 39 forks source link

Printer methods do not accept null port #57

Closed JCTInfinity closed 2 years ago

JCTInfinity commented 2 years ago

According to comments in index.d.ts I should be able to call print methods, openCashDrawer, and checkStatus passing null for the port to use a printer I've already connected to via connect. However these methods specifically expect only a string, causing potentially-null values to throw an exception during compilation in strictly-typed applications.

I'm opening this issue for record keeping, but I'll be setting up a PR today to address the issue by changing the type from string to string|null.

JCTInfinity commented 2 years ago

... I opened this on the wrong repository. I meant to do so on @awesome-cordova-plugins/star-prnt. Sorry for the mistake.