From a861efa6d78253cfd61c563275044c011603b017 Mon Sep 17 00:00:00 2001 From: Yue JIN <40021217+kingyue737@users.noreply.github.com> Date: Thu, 22 Aug 2024 13:33:23 +0800 Subject: [PATCH] fix: make callback of open, close and destroy optional --- ModbusRTU.d.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ModbusRTU.d.ts b/ModbusRTU.d.ts index fd445e3..45aec7b 100644 --- a/ModbusRTU.d.ts +++ b/ModbusRTU.d.ts @@ -8,9 +8,9 @@ export class ModbusRTU { static getPorts(): Promise - 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): void; writeFC2(address: number, dataAddress: number, length: number, next: NodeStyleCallback): void; @@ -161,4 +161,4 @@ export interface TelnetPortOptions { export interface C701PortOptions { port?: number; -} \ No newline at end of file +}