Skip to content

Commit

Permalink
fix: make callback of open, close and destroy optional
Browse files Browse the repository at this point in the history
  • Loading branch information
kingyue737 authored Aug 22, 2024
1 parent 6649806 commit a861efa
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ModbusRTU.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ export class ModbusRTU {

static getPorts(): Promise<PortInfo[]>

open(callback: Function): void;
close(callback: Function): void;
destroy(callback: Function): void;
open(callback?: Function): void;
close(callback?: Function): void;
destroy(callback?: Function): void;

writeFC1(address: number, dataAddress: number, length: number, next: NodeStyleCallback<ReadCoilResult>): void;
writeFC2(address: number, dataAddress: number, length: number, next: NodeStyleCallback<ReadCoilResult>): void;
Expand Down Expand Up @@ -161,4 +161,4 @@ export interface TelnetPortOptions {

export interface C701PortOptions {
port?: number;
}
}

0 comments on commit a861efa

Please sign in to comment.