-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.d.ts
62 lines (54 loc) · 1.65 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
declare module "react-native-image-picker" {
interface Response {
customButton: string;
didCancel: boolean;
error: string;
data: string;
uri: string;
origURL?: string;
isVertical: boolean;
width: number;
height: number;
fileSize: number;
type?: string;
fileName?: string;
path?: string;
latitude?: number;
longitude?: number;
timestamp?: string;
}
interface CustomButtonOptions {
name?: string;
title?: string;
}
interface Options {
title?: string;
cancelButtonTitle?: string;
takePhotoButtonTitle?: string;
chooseFromLibraryButtonTitle?: string;
customButtons?: Array<CustomButtonOptions>;
cameraType?: 'front' | 'back';
mediaType?: 'photo' | 'video' | 'mixed';
maxWidth?: number;
maxHeight?: number;
quality?: number;
videoQuality?: 'low' | 'medium' | 'high';
durationLimit?: number;
rotation?: number;
allowsEditing?: boolean;
noData?: boolean;
storageOptions?: StorageOptions;
}
interface StorageOptions {
skipBackup?: boolean;
path?: string;
cameraRoll?: boolean;
waitUntilSaved?: boolean;
}
class ImagePicker {
static showImagePicker(options: Options, callback: (response: Response) => void): void;
static launchCamera(options: Options, callback: (response: Response) => void): void;
static launchImageLibrary(options: Options, callback: (response: Response) => void): void;
}
export = ImagePicker;
}