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

monitorTag function typing doesn't have timestamp in the callback #5

Open
aanilyildiz opened this issue Apr 20, 2021 · 0 comments
Open

Comments

@aanilyildiz
Copy link

const options = {
  target: {
    host: "172.16.21.6",
    netID: "5.9.36.191.1.1",
    amsPort: 801
  }
};
const client = new AdsClient.default(options);
client
  .connect()
  .then(async () => {
    // write a tag
    return client.monitorTag(".bTest",  (value, timestamp) => {
      console.log(`.bTest value changed ${value} at ${timestamp}`)
    });
  })
  .catch(err => {
    console.log("failed monitor item: ", err);
  });

Using the monitorTag as given in the example above gives the following error:
Argument of type '(value: any, timestamp: any) => void' is not assignable to parameter of type '(value: any) => void'

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