refactor(): cleanup

This commit is contained in:
Ibby Hadeed 2017-04-27 00:49:23 -04:00
parent 17366a29da
commit c3d23b0ee9
2 changed files with 11 additions and 11 deletions

View File

@ -1,5 +1,5 @@
import { Injectable } from '@angular/core'; import { Injectable } from '@angular/core';
import { Cordova, Plugin } from '@ionic-native/core'; import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
/** /**
@ -33,13 +33,13 @@ import { Cordova, Plugin } from '@ionic-native/core';
platforms: ['iOS'] platforms: ['iOS']
}) })
@Injectable() @Injectable()
export class Keychain { export class Keychain extends IonicNativePlugin {
/** /**
* Retrieves a value for a key * Retrieves a value for a key
* *
* @param {string} key the key to retrieve * @param {string} key the key to retrieve
* @param {string} TouchIDMessage the message to show underneath the TouchID prompt (if any) * @param {string} [touchIDMessage] the message to show underneath the TouchID prompt (if any)
*/ */
@Cordova({ @Cordova({
callbackOrder: 'reverse' callbackOrder: 'reverse'
@ -51,7 +51,7 @@ export class Keychain {
* *
* @param {string} key the key to set * @param {string} key the key to set
* @param {string|number|boolean} value the value to set * @param {string|number|boolean} value the value to set
* @param {boolean} useTouchID whether to store the value with security such that TouchID will be needed to grab it * @param {boolean} [useTouchID] whether to store the value with security such that TouchID will be needed to grab it
*/ */
@Cordova({ @Cordova({
callbackOrder: 'reverse' callbackOrder: 'reverse'
@ -62,7 +62,7 @@ export class Keychain {
* Gets a JSON value for a key * Gets a JSON value for a key
* *
* @param {string} key the key to retrieve * @param {string} key the key to retrieve
* @param {string} TouchIDMessage the message to show underneath the TouchID prompt (if any) * @param {string} touchIDMessage the message to show underneath the TouchID prompt (if any)
*/ */
@Cordova({ @Cordova({
callbackOrder: 'reverse' callbackOrder: 'reverse'
@ -73,8 +73,8 @@ export class Keychain {
* Sets a JSON value for a key * Sets a JSON value for a key
* *
* @param {string} key the key to set * @param {string} key the key to set
* @param {any} value the value to set * @param {any} obj value the value to set
* @param {boolean} Wether to store the value with security such that TouchID will be needed to grab it * @param {boolean} [useTouchId] Wether to store the value with security such that TouchID will be needed to grab it
*/ */
@Cordova({ @Cordova({
callbackOrder: 'reverse' callbackOrder: 'reverse'

View File

@ -92,7 +92,6 @@ export class MediaObject {
}) })
startRecord(): void { } startRecord(): void { }
/** /**
* Stops recording * Stops recording
*/ */
@ -124,6 +123,7 @@ export class MediaObject {
sync: true sync: true
}) })
stop(): void { } stop(): void { }
} }
export type MediaStatusUpdateCallback = (statusCode: number) => void; export type MediaStatusUpdateCallback = (statusCode: number) => void;
@ -262,9 +262,9 @@ export class MediaPlugin extends IonicNativePlugin {
/** /**
* Open a media file * Open a media file
* @param src {string} A URI containing the audio content. * @param src {string} A URI containing the audio content.
* @param onStatusUpdate {MediaStatusUpdateCallback} A callback function to be invoked when the status of the file changes * @param [onStatusUpdate] {MediaStatusUpdateCallback} A callback function to be invoked when the status of the file changes
* @param onSuccess {Function} A callback function to be invoked after the current play, record, or stop action is completed * @param [onSuccess] {Function} A callback function to be invoked after the current play, record, or stop action is completed
* @param onError {MediaErrorCallback} A callback function is be invoked if an error occurs. * @param [onError] {MediaErrorCallback} A callback function is be invoked if an error occurs.
* @return {MediaObject} * @return {MediaObject}
*/ */
@CordovaCheck() @CordovaCheck()