From cb5eed1f05c4a814e0516ada350ec666daf1bb25 Mon Sep 17 00:00:00 2001 From: Marek Serafin Date: Wed, 29 May 2024 13:02:31 +0200 Subject: [PATCH] fix(typescript): interface optional parameters error --- .github/workflows/test.yml | 1 + index.d.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0348cc3e..f4fe78f2 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -34,6 +34,7 @@ jobs: - run: npm run rebuild - run: npm test - run: npm run coverage + - run: npx tsc *.d.ts - uses: codecov/codecov-action@v3 with: directory: ./coverage/ \ No newline at end of file diff --git a/index.d.ts b/index.d.ts index 3c8cc230..b7f049cf 100644 --- a/index.d.ts +++ b/index.d.ts @@ -25,7 +25,7 @@ export declare function startScanning(serviceUUIDs?: string[], allowDuplicates?: export declare function startScanningAsync(serviceUUIDs?: string[], allowDuplicates?: boolean): Promise; export declare function stopScanning(callback?: () => void): void; export declare function stopScanningAsync(): Promise; -export declare function connect(peripheralUuid: string, options?: object, callback?: (error?: Error, peripheral: Peripheral) => void): void; +export declare function connect(peripheralUuid: string, options?: object, callback?: (error: Error | undefined, peripheral: Peripheral) => void): void; export declare function connectAsync(peripheralUuid: string, options?: object): Promise; export declare function cancelConnect(peripheralUuid: string, options?: object): void; export declare function reset(): void;