forked from solinor/react-native-bluetooth-status
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.d.ts
29 lines (29 loc) · 638 Bytes
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
declare module 'react-native-bluetooth-status' {
class BluetoothManager {
subscription: any
inited?: boolean
bluetoothState?:
| 'unknown'
| 'resetting'
| 'unsupported'
| 'unauthorized'
| 'off'
| 'on'
| 'unknown'
listener?: Function
constructor()
addListener(listener: Function): void
removeListener(): void
state(): Promise<boolean>
manualInit(): void
enable(enabled?: boolean): void
disable(): Promise<void>
}
export const BluetoothStatus: BluetoothManager
export const useBluetoothStatus: () => [
boolean | undefined,
boolean,
(enable?: boolean | undefined) => void,
]
export {}
}