auctifera-josed / starprnt

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

[documentation] starprnt.connect throws without 2nd callback function #33

Open daniellizik opened 5 years ago

daniellizik commented 5 years ago

ver: 2.2.0

starprnt.connect(
  'BT:TSP100',
  'StarGraphic',
  (err, res) => {}
)

This produces

Error in Error callbackId: StarPRNT1691079869 : TypeError: callback is not a function. (In 'callback(error)', 'callback' is undefined)

If you pass in two callbacks there's no error (success callback, then error callback)

starprnt.connect(
  'BT:TSP100',
  'StarGraphic',
  (success) => {},
  (error) => {},
)

Just a documentation thing regarding the StarIOExtManager section

daniellizik commented 5 years ago

ill open a pr later