levrik / node-modern-rcon

A modern RCON client implementation written in ES2015
MIT License
29 stars 5 forks source link

Type definition for node-modern-rcon. #2

Open electricessence opened 6 years ago

electricessence commented 6 years ago

Basic external type declaration that currently reflects rcon.js.

@levrik: thank you, and you're welcome. 😁

electricessence commented 6 years ago

Just a thought, I'm not sure if you need to be exporting the RconError since it's only instantiated internally.

I welcome you to review my main fork as well. There's some adjustments including logging and send can be immediately queued. Event handling is refined to be properly stateful. The state property is more informative.

But fundamentally, the code you wrote is solid. Thanks again. I'm able to connect to Factorio successfully using Nodejs. :) I wonder how easy this would be to port to the browser. :|

levrik commented 6 years ago

It's exported so people can check via instanceof

electricessence commented 6 years ago

Oh yeah of course. Something I blanked on. :P

electricessence commented 6 years ago

@levrik Ok all set. I added the last touch to the project file so it includes the typings and updated the patch version so it can be published.