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.
According to comments in
index.d.ts
I should be able to callprint
methods,openCashDrawer
, andcheckStatus
passingnull
for the port to use a printer I've already connected to viaconnect
. 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
tostring|null
.