Skip to content

Commit

Permalink
Correct handle types in d.ts
Browse files Browse the repository at this point in the history
Handles are 16bit integers, not Buffers.
  • Loading branch information
nya3jp authored and rzr committed Apr 7, 2022
1 parent 393e6a6 commit e3fa7c9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,10 @@ export declare class Peripheral extends events.EventEmitter {
discoverSomeServicesAndCharacteristicsAsync(serviceUUIDs: string[], characteristicUUIDs: string[]): Promise<ServicesAndCharacteristics>;
cancelConnect(options?: object): void;

readHandle(handle: Buffer, callback: (error: string, data: Buffer) => void): void;
readHandleAsync(handle: Buffer): Promise<Buffer>;
writeHandle(handle: Buffer, data: Buffer, withoutResponse: boolean, callback: (error: string) => void): void;
writeHandleAsync(handle: Buffer, data: Buffer, withoutResponse: boolean): Promise<void>;
readHandle(handle: number, callback: (error: string, data: Buffer) => void): void;
readHandleAsync(handle: number): Promise<Buffer>;
writeHandle(handle: number, data: Buffer, withoutResponse: boolean, callback: (error: string) => void): void;
writeHandleAsync(handle: number, data: Buffer, withoutResponse: boolean): Promise<void>;
toString(): string;

on(event: "connect", listener: (error: string) => void): this;
Expand Down

0 comments on commit e3fa7c9

Please sign in to comment.