// Type definitions for react-native-bluetooth-serial 1.0 // Project: https://github.com/rusel1989/react-native-bluetooth-serial // Definitions by: Rodrigo Weber // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.8 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; function list(): Promise>; function isEnabled(): Promise; function connect(id: string): Promise; function disconnect(): Promise; function isConnected(): Promise; }