Skip to content

Commit

Permalink
Add typescript definition file
Browse files Browse the repository at this point in the history
  • Loading branch information
wcandillon committed Apr 4, 2017
1 parent 34d80f2 commit 97b74d1
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -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<Image | Image[]>;
export function openCamera(options: Options): Promise<Image | Image[]>;
}

0 comments on commit 97b74d1

Please sign in to comment.