diff --git a/src/@ionic-native/plugins/crop/index.ts b/src/@ionic-native/plugins/crop/index.ts index ab5242ffd..928675009 100644 --- a/src/@ionic-native/plugins/crop/index.ts +++ b/src/@ionic-native/plugins/crop/index.ts @@ -1,6 +1,12 @@ import { Injectable } from '@angular/core'; import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core'; +export interface CropOptions { + quality?: number; + targetHeight?: number; + targetWidth?: number; +} + /** * @name Crop * @description Crops images @@ -18,6 +24,8 @@ import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core'; * error => console.error('Error cropping image', error) * ); * ``` + * @interfaces + * CropOptions */ @Plugin({ pluginName: 'Crop', @@ -28,7 +36,6 @@ import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core'; }) @Injectable() export class Crop extends IonicNativePlugin { - /** * Crops an image * @param pathToImage @@ -38,6 +45,7 @@ export class Crop extends IonicNativePlugin { @Cordova({ callbackOrder: 'reverse' }) - crop(pathToImage: string, options?: { quality: number, targetHeight: number, targetWidth: number }): Promise { return; } - + crop(pathToImage: string, options?: CropOptions): Promise { + return; + } }