@elgato-stream-deck/node
Version:
An npm module for interfacing with the Elgato Stream Deck in node
30 lines • 1.28 kB
TypeScript
import type { DeviceModelId, HIDDevice, HIDDeviceEvents, HIDDeviceInfo } from '@elgato-stream-deck/core';
import type { ChildHIDDeviceInfo } from '@elgato-stream-deck/core/dist/hid-device';
import { EventEmitter } from 'eventemitter3';
import type { HIDAsync } from 'node-hid';
/**
* Information about a found streamdeck
*/
export interface StreamDeckDeviceInfo {
/** The model of the device */
model: DeviceModelId;
/** The connected path of the device in the usb tree */
path: string;
/** The serialNumber of the device. If set it can be used as a unique hardware identifier */
serialNumber?: string;
}
/**
* The wrapped node-hid HIDDevice.
* This translates it into the common format expected by @elgato-stream-deck/core
*/
export declare class NodeHIDDevice extends EventEmitter<HIDDeviceEvents> implements HIDDevice {
private device;
constructor(device: HIDAsync);
close(): Promise<void>;
sendFeatureReport(data: Uint8Array): Promise<void>;
getFeatureReport(reportId: number, reportLength: number): Promise<Uint8Array>;
sendReports(buffers: Uint8Array[]): Promise<void>;
getDeviceInfo(): Promise<HIDDeviceInfo>;
getChildDeviceInfo(): Promise<ChildHIDDeviceInfo | null>;
}
//# sourceMappingURL=hid-device.d.ts.map