Skip to content

Commit c2564a2

Browse files
committed
Fix isPortOpen()
1 parent ecd5f43 commit c2564a2

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

index.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ export declare class Input extends EventEmitter {
7272
on(evt: "reset", handler: () => void): this;
7373
on(evt: "sysex", handler: (param: Sysex) => void): this;
7474
close(): void;
75+
isPortOpen(): boolean;
7576
}
7677

7778
export declare class Output {
@@ -94,6 +95,7 @@ export declare class Output {
9495
send(evt: "reset"): void;
9596
send(evt: "sysex", param: Array<number>): void;
9697
close(): void;
98+
isPortOpen(): boolean;
9799
}
98100

99101
export declare function getInputs(): string[];

index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ class Input extends EventEmitter {
102102
}
103103

104104
isPortOpen() {
105-
this._input.isPortOpen();
105+
return this._input.isPortOpen();
106106
}
107107

108108
parseMtc(data) {
@@ -219,7 +219,7 @@ class Output {
219219
}
220220

221221
isPortOpen() {
222-
this._output.isPortOpen();
222+
return this._output.isPortOpen();
223223
}
224224

225225
send(type, args) {

0 commit comments

Comments
 (0)