Skip to content

Commit

Permalink
fix(TestPort): ts build error (#484)
Browse files Browse the repository at this point in the history
  • Loading branch information
chaos2171053 authored Nov 29, 2022
1 parent edc4eff commit 9de01f9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion ModbusRTU.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Socket } from 'net';
import TestPort from './ports/testport';
import { TestPort } from "./TestPort";
export class ModbusRTU {
constructor(port?: any);
static TestPort: typeof TestPort
Expand Down
7 changes: 7 additions & 0 deletions TestPort.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import * as EventEmitter from "events";
export class TestPort extends EventEmitter {
isOpen: () => boolean;
open: (callback: (...args: any[]) => any) => void;
close: (callback: (...args: any[]) => any) => void;
write:(data:Buffer)=>void;
}

0 comments on commit 9de01f9

Please sign in to comment.