Installation
npm install --save @types/react-native-bluetooth-serial
Summary
This package contains type definitions for react-native-bluetooth-serial (https://github.com/rusel1989/react-native-bluetooth-serial).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-native-bluetooth-serial.
index.d.ts
import * as React from "react";
import * as ReactNative from "react-native";
export type Buffer = (data: number[]) => void;
export namespace BluetoothSerial {
function on(eventName: string, handler: () => void): void;
function removeListener(eventName: string, handler: () => void): void;
function write(data: Buffer | string): Promise<boolean>;
function list(): Promise<Array<{ id: string; name: string }>>;
function isEnabled(): Promise<boolean>;
function connect(id: string): Promise<void>;
function disconnect(): Promise<void>;
function isConnected(): Promise<boolean>;
}
Additional Details
- Last updated: Thu, 21 Dec 2023 19:06:51 GMT
- Dependencies: @types/react, react-native
Credits
These definitions were written by Rodrigo Weber.