diff --git a/index.d.ts b/index.d.ts index 8916a879a..57ed95df3 100644 --- a/index.d.ts +++ b/index.d.ts @@ -141,12 +141,7 @@ declare module "react-native-image-crop-picker" { type ImageOptions = CommonOptions & { mediaType: 'photo'; - - /** - * Selected image location. This is null when the `writeTempFile` option is set to `false`. - */ - path: string; - + /** * Width of result image when used with `cropping` option. */ @@ -315,6 +310,13 @@ declare module "react-native-image-crop-picker" { compressImageQuality?: number; } + type CropperOptions = ImageOptions & { + /** + * Selected image location + */ + path: string; + } + type VideoOptions = CommonOptions & { mediaType: 'video'; @@ -460,14 +462,14 @@ declare module "react-native-image-crop-picker" { export function openPicker(options: O): Promise>>; export function openCamera(options: O): Promise>>; - export function openCropper(options: ImageOptions): Promise; + export function openCropper(options: CropperOptions): Promise; export function clean(): Promise; export function cleanSingle(path: string): Promise; export interface ImageCropPicker { openPicker(options: O): Promise>>; openCamera(options: O): Promise>>; - openCropper(options: ImageOptions): Promise; + openCropper(options: CropperOptions): Promise; clean(): Promise; cleanSingle(path: string): Promise; } diff --git a/package.json b/package.json index 85b50f9f9..f573dd0b9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-native-image-crop-picker", - "version": "0.33.3", + "version": "0.33.4", "description": "Select single or multiple images, with cropping option", "main": "index.js", "scripts": {