@types/react-native-bluetooth-serial
TypeScript icon, indicating that this package has built-in type declarations

1.0.5 • Public • Published

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

Credits

These definitions were written by Rodrigo Weber.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/react-native-bluetooth-serial

Weekly Downloads

50

Version

1.0.5

License

MIT

Unpacked Size

4.12 kB

Total Files

5

Last publish

Collaborators

  • types