From e3fa7c9228a526c1cc117eef440b6ecd8903ee95 Mon Sep 17 00:00:00 2001 From: Shuhei Takahashi Date: Thu, 31 Mar 2022 20:41:30 +0900 Subject: [PATCH] Correct handle types in d.ts Handles are 16bit integers, not Buffers. --- index.d.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/index.d.ts b/index.d.ts index b826a2d42..2d447f513 100644 --- a/index.d.ts +++ b/index.d.ts @@ -84,10 +84,10 @@ export declare class Peripheral extends events.EventEmitter { discoverSomeServicesAndCharacteristicsAsync(serviceUUIDs: string[], characteristicUUIDs: string[]): Promise; cancelConnect(options?: object): void; - readHandle(handle: Buffer, callback: (error: string, data: Buffer) => void): void; - readHandleAsync(handle: Buffer): Promise; - writeHandle(handle: Buffer, data: Buffer, withoutResponse: boolean, callback: (error: string) => void): void; - writeHandleAsync(handle: Buffer, data: Buffer, withoutResponse: boolean): Promise; + readHandle(handle: number, callback: (error: string, data: Buffer) => void): void; + readHandleAsync(handle: number): Promise; + writeHandle(handle: number, data: Buffer, withoutResponse: boolean, callback: (error: string) => void): void; + writeHandleAsync(handle: number, data: Buffer, withoutResponse: boolean): Promise; toString(): string; on(event: "connect", listener: (error: string) => void): this;