UNPKG

@elgato-stream-deck/webhid

Version:

An npm module for interfacing with the Elgato Stream Deck in the browser

21 lines 1 kB
import type { HIDDevice as CoreHIDDevice, HIDDeviceEvents, HIDDeviceInfo } from '@elgato-stream-deck/core'; import type { ChildHIDDeviceInfo } from '@elgato-stream-deck/core/dist/hid-device'; import { EventEmitter } from 'eventemitter3'; /** * The wrapped browser HIDDevice. * This translates it into the common format expected by @elgato-stream-deck/core */ export declare class WebHIDDevice extends EventEmitter<HIDDeviceEvents> implements CoreHIDDevice { private readonly device; private readonly reportQueue; private readonly reportByteLengths; constructor(device: HIDDevice); close(): Promise<void>; forget(): 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