dualsense-ts
Version:
The natural interface for your DualSense and DualSense Access controllers, with Typescript
29 lines • 1.26 kB
TypeScript
import type { HID } from "node-hid";
import { HIDProvider, DualsenseHIDState, DualsenseDeviceInfo } from "./hid_provider";
export interface NodeHIDProviderOptions {
/** Connect only to the device at this specific path */
devicePath?: string;
/** Prefer the device with this serial number (stable across USB/BT switches) */
serialNumber?: string;
}
export declare class NodeHIDProvider extends HIDProvider {
device?: HID;
wireless?: boolean;
buffer?: Buffer;
private connecting;
/** Target device path — mutable so the manager can update it on USB/BT switches */
targetPath?: string;
/** Target serial number — stable identifier for reconnection */
targetSerial?: string;
constructor(options?: NodeHIDProviderOptions);
/** List all available Dualsense controllers */
static enumerate(): Promise<DualsenseDeviceInfo[]>;
connect(): Promise<void>;
write(data: Uint8Array): Promise<void>;
readFeatureReport(reportId: number, length: number): Promise<Uint8Array>;
sendFeatureReport(_reportId: number, data: Uint8Array): Promise<void>;
get connected(): boolean;
disconnect(): void;
process(buffer: Buffer): DualsenseHIDState;
}
//# sourceMappingURL=node_hid_provider.d.ts.map