forked from ivpusic/react-native-image-crop-picker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.d.ts
63 lines (57 loc) · 1.9 KB
/
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
declare module "react-native-image-crop-picker" {
export interface Options {
cropping?: boolean;
width?: number;
height?: number;
multiple?: boolean;
path?: string;
includeBase64?: boolean;
includeExif?: boolean;
cropperTintColor?: string;
cropperCircleOverlay?: boolean;
maxFiles?: number;
waitAnimationEnd?: boolean;
smartAlbums?: string[];
useFrontCamera?: boolean;
compressVideoPreset?: string;
compressImageMaxWidth?: number;
compressImageMaxHeight?: number;
compressImageQuality?: number;
loadingLabelText?: string;
mediaType?: string;
showsSelectedCount?: boolean;
showCropGuidelines?: boolean;
hideBottomControls?: boolean;
enableRotationGesture?: boolean;
}
export interface Image {
path: string;
size: number;
data: null | string;
width: number;
height: number;
mime: string;
exif: null | object;
cropRect: null | CropRect
}
export interface CropRect {
x: number;
y: number;
width: number;
height: number;
}
export function openPicker(options: Options): Promise<Image | Image[]>;
export function openCamera(options: Options): Promise<Image | Image[]>;
export function openCropper(options: Options): Promise<Image>;
export function clean(): Promise<void>;
export function cleanSingle(path: string): Promise<void>;
export interface ImageCropPicker {
openPicker(options: Options): Promise<Image | Image[]>;
openCamera(options: Options): Promise<Image | Image[]>;
openCropper(options: Options): Promise<Image>;
clean(): Promise<void>;
cleanSingle(path: string): Promise<void>;
}
const ImageCropPicker: ImageCropPicker;
export default ImageCropPicker;
}