diff --git a/index.d.ts b/index.d.ts new file mode 100644 index 0000000..4d8ad34 --- /dev/null +++ b/index.d.ts @@ -0,0 +1,38 @@ +declare module "react-native-image-crop-picker" { + export interface Options { + cropping?: boolean; + width?: number; + height?: number; + multiple?: boolean; + path?: string; + includeBase64?: 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; + } + + export function openPicker(options: Options): Promise; + export function openCamera(options: Options): Promise; +}