DefinitelyTyped/types/react-cropper/index.d.ts
2019-04-17 15:21:33 -07:00

22 lines
925 B
TypeScript

// Type definitions for react-cropper 0.10
// Project: https://github.com/roadmanfong/react-cropper, http://roadmanfong.github.io/react-cropper
// Definitions by: Stepan Mikhaylyuk <https://github.com/stepancar>
// Walter Barbagallo <https://github.com/bwlt>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.8
import * as cropperjs from 'cropperjs';
import * as React from 'react';
type Omit<T, K> = Pick<T, Exclude<keyof T, K>>;
export interface ReactCropperProps extends cropperjs.CropperOptions, Omit<React.HTMLProps<HTMLImageElement>, 'data' | 'ref'> {
ref: string | ((cropper: null | ReactCropper) => any);
}
interface ReactCropper extends cropperjs {} // tslint:disable-line no-empty-interface
declare class ReactCropper extends React.Component<ReactCropperProps> {
on(eventname: string, callback: () => void): void;
}
export default ReactCropper;