diff --git a/types/croppie/croppie-tests.ts b/types/croppie/croppie-tests.ts index 581d01435d..a82b04fabb 100644 --- a/types/croppie/croppie-tests.ts +++ b/types/croppie/croppie-tests.ts @@ -22,4 +22,6 @@ c.result({ type: 'blob' }).then(blob => { x = blob; }); +c.get(); + c.destroy(); diff --git a/types/croppie/index.d.ts b/types/croppie/index.d.ts index 97f53f84c8..a8b53c54e5 100644 --- a/types/croppie/index.d.ts +++ b/types/croppie/index.d.ts @@ -3,6 +3,7 @@ // Definitions by: Connor Peet // dklmuc // Sarun Intaralawan +// Knut Erik Helgesen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped export as namespace Croppie; @@ -26,6 +27,8 @@ declare class Croppie { result(options: Croppie.ResultOptions & { type: 'rawcanvas' }): Promise; result(options?: Croppie.ResultOptions): Promise; + get(): Croppie.CropData; + rotate(degrees: 90 | 180 | 270 | -90 | -180 | -270): void; setZoom(zoom: number): void; @@ -59,4 +62,10 @@ declare namespace Croppie { showZoomer?: boolean; viewport?: { width: number, height: number, type?: CropType }; } + + interface CropData { + points?: number[]; + orientation?: number; + zoom?: number; + } }