Closed bloomkd46 closed 1 year ago
Note: it will now generate an error if you try to initialize dorita980 with new
. To fix this just don't use the new
keyword when initializing dorita980.
example:
var dorita980 = require('dorita980');
var myRobotViaLocal = new dorita980.Local('MyUsernameBlid', 'MyPassword', '192.168.1.104'); // robot IP address
myRobotViaLocal.on('connect', init);
function init () {
myRobotViaLocal.clean()
.then(() => myRobotViaLocal.end()) // disconnect to leave free the channel for the mobile app.
.catch(console.log);
}
turns into
var dorita980 = require('dorita980');
var myRobotViaLocal = /*new*/ dorita980.Local('MyUsernameBlid', 'MyPassword', '192.168.1.104'); // robot IP address
myRobotViaLocal.on('connect', init);
function init () {
myRobotViaLocal.clean()
.then(() => myRobotViaLocal.end()) // disconnect to leave free the channel for the mobile app.
.catch(console.log);
}
@koalazak, this pull request has now been finished and is ready for merging
Need to change Pick<>’s to interface[key]’s
I am deleting my fork and re-creating it to hopefully fix the messy git history
Added types based off of the documentation to make library more user-friendly.