Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does We have any plan using Typescript to refactor this repo? #551

Open
teddy1565 opened this issue Apr 9, 2024 · 0 comments
Open

Does We have any plan using Typescript to refactor this repo? #551

teddy1565 opened this issue Apr 9, 2024 · 0 comments

Comments

@teddy1565
Copy link
Contributor

Hi I want check, does we have any plan using Typescript to refactor this repo?

There are indeed good people who help declare types, but in many cases they cannot be correctly recognized and quoted.

And especially one thing that is more difficult for me to understand is that
We have ModbusRTU Slave function, but it cannot be easily referenced like TCP Server

in document

const ModbusRTU = require("modbus-serial");

but the example is mean ModbusTCP Server not ModbusRTU Slave

and module default export is ModbusTCP Server

if you want use modbusRTU Slave

const ModbusRTU = require("modbus-serial");
const vector = /* reference tcp server*/

const options = {
    path: "/dev/ttyUSB0",
    baudRate: 9600,
    debug: false,
    unitID: 1
}

const ModbusRTUSlave = new ModbusRTU.ServerSerial(vector, options);

I'm going to try to find some time to plan refactor this project using typescript
Or does anyone want to do this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant