docs(ble): add missing documentations

This commit is contained in:
Daniel 2018-04-08 19:09:43 +02:00
parent 376d16904c
commit 7cbe7a6287

View File

@ -232,7 +232,7 @@ export class BLE extends IonicNativePlugin {
/** /**
* Scans for BLE devices. This function operates similarly to the `startScan` function, but allows you to specify extra options (like allowing duplicate device reports). * Scans for BLE devices. This function operates similarly to the `startScan` function, but allows you to specify extra options (like allowing duplicate device reports).
* @param {string[]} services List of service UUIDs to discover, or `[]` to find all devices * @param {string[]} services List of service UUIDs to discover, or `[]` to find all devices
* @param options {any} * @param {BLEScanOptions} options Options
* @returns {Observable<any>} Returns an Observable that notifies of each peripheral discovered. * @returns {Observable<any>} Returns an Observable that notifies of each peripheral discovered.
*/ */
@Cordova({ @Cordova({
@ -259,7 +259,7 @@ export class BLE extends IonicNativePlugin {
* BLE.stopScan().then(() => { console.log('scan stopped'); }); * BLE.stopScan().then(() => { console.log('scan stopped'); });
* }, 5000); * }, 5000);
* ``` * ```
* @return returns a Promise. * @returns {Promise<any>}
*/ */
@Cordova() @Cordova()
stopScan(): Promise<any> { stopScan(): Promise<any> {
@ -277,8 +277,8 @@ export class BLE extends IonicNativePlugin {
* console.log('disconnected'); * console.log('disconnected');
* }); * });
* ``` * ```
* @param deviceId {string} UUID or MAC address of the peripheral * @param {string} deviceId UUID or MAC address of the peripheral
* @return Returns an Observable that notifies of connect/disconnect. * @return {Observable<any>} Returns an Observable that notifies of connect/disconnect.
*/ */
@Cordova({ @Cordova({
observable: true, observable: true,
@ -297,8 +297,8 @@ export class BLE extends IonicNativePlugin {
* console.log('Disconnected'); * console.log('Disconnected');
* }); * });
* ``` * ```
* @param deviceId {string} UUID or MAC address of the peripheral * @param {string} deviceId UUID or MAC address of the peripheral
* @return Returns a Promise * @return {Promise<any>} Returns a Promise
*/ */
@Cordova() @Cordova()
disconnect(deviceId: string): Promise<any> { disconnect(deviceId: string): Promise<any> {
@ -311,7 +311,7 @@ export class BLE extends IonicNativePlugin {
* @param {string} deviceId UUID or MAC address of the peripheral * @param {string} deviceId UUID or MAC address of the peripheral
* @param {string} serviceUUID UUID of the BLE service * @param {string} serviceUUID UUID of the BLE service
* @param {string} characteristicUUID UUID of the BLE characteristic * @param {string} characteristicUUID UUID of the BLE characteristic
* @return Returns a Promise * @return {Promise<any>} Returns a Promise
*/ */
@Cordova() @Cordova()
read( read(
@ -348,7 +348,7 @@ export class BLE extends IonicNativePlugin {
* @param {string} serviceUUID UUID of the BLE service * @param {string} serviceUUID UUID of the BLE service
* @param {string} characteristicUUID UUID of the BLE characteristic * @param {string} characteristicUUID UUID of the BLE characteristic
* @param {ArrayBuffer} value Data to write to the characteristic, as an ArrayBuffer. * @param {ArrayBuffer} value Data to write to the characteristic, as an ArrayBuffer.
* @return Returns a Promise * @return {Promise<any>} Returns a Promise
*/ */
@Cordova() @Cordova()
write( write(
@ -367,7 +367,7 @@ export class BLE extends IonicNativePlugin {
* @param {string} serviceUUID UUID of the BLE service * @param {string} serviceUUID UUID of the BLE service
* @param {string} characteristicUUID UUID of the BLE characteristic * @param {string} characteristicUUID UUID of the BLE characteristic
* @param {ArrayBuffer} value Data to write to the characteristic, as an ArrayBuffer. * @param {ArrayBuffer} value Data to write to the characteristic, as an ArrayBuffer.
* @return Returns a Promise * @return {Promise<any>} Returns a Promise
*/ */
@Cordova() @Cordova()
writeWithoutResponse( writeWithoutResponse(
@ -392,7 +392,7 @@ export class BLE extends IonicNativePlugin {
* @param {string} deviceId UUID or MAC address of the peripheral * @param {string} deviceId UUID or MAC address of the peripheral
* @param {string} serviceUUID UUID of the BLE service * @param {string} serviceUUID UUID of the BLE service
* @param {string} characteristicUUID UUID of the BLE characteristic * @param {string} characteristicUUID UUID of the BLE characteristic
* @return Returns an Observable that notifies of characteristic changes. * @return {Observable<any>} Returns an Observable that notifies of characteristic changes.
*/ */
@Cordova({ @Cordova({
observable: true, observable: true,
@ -462,7 +462,7 @@ export class BLE extends IonicNativePlugin {
* }); * });
* ``` * ```
* *
* @return Returns an Observable that notifies when the Bluetooth is enabled or disabled on the device. * @return {Observable<any>} Returns an Observable that notifies when the Bluetooth is enabled or disabled on the device.
*/ */
@Cordova({ @Cordova({
observable: true, observable: true,
@ -508,7 +508,7 @@ export class BLE extends IonicNativePlugin {
* *
* @param {string} deviceId UUID or MAC address of the peripheral * @param {string} deviceId UUID or MAC address of the peripheral
* *
*@returns {Promise<any>} * @returns {Promise<any>}
*/ */
@Cordova() @Cordova()
readRSSI(deviceId: string): Promise<any> { readRSSI(deviceId: string): Promise<any> {