-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathindex.d.ts
40 lines (29 loc) · 875 Bytes
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
import { EventEmitter } from "events"
type OS2LServerOptions = {
doPublish: boolean,
port: number
}
export declare class OS2LServer extends EventEmitter {
constructor(options: OS2LServerOptions);
start(callback?: () => void): Promise<void>;
stop(): void;
feedback(name: string, state: boolean, page?: string): void;
}
type OS2LClientOptions = {
port: number,
host: string,
useDNS_SD: boolean,
autoReconnect: boolean,
autoReconnectInterval: number
}
export declare class OS2LClient extends EventEmitter {
constructor(options: OS2LClientOptions);
connect(callback?: () => void): Promise<Void>;
close(): void;
buttonOn(name: string): void;
buttonOff(name: string): void;
command(id: number, param: number): void;
beat(change: boolean, pos: number, bpm: number): void;
custom(object: any): void;
get isConnected(): boolean;
}