Skip to content

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

@aanilyildiz

Description

@aanilyildiz
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'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions