mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-30 10:35:22 +08:00
Merge pull request #25749 from knuthelgesen/master
[@types/croppie] Added the method "get()" from the Croppie library
This commit is contained in:
@@ -22,4 +22,6 @@ c.result({ type: 'blob' }).then(blob => {
|
||||
x = blob;
|
||||
});
|
||||
|
||||
c.get();
|
||||
|
||||
c.destroy();
|
||||
|
||||
9
types/croppie/index.d.ts
vendored
9
types/croppie/index.d.ts
vendored
@@ -3,6 +3,7 @@
|
||||
// Definitions by: Connor Peet <https://github.com/connor4312>
|
||||
// dklmuc <https://github.com/dklmuc>
|
||||
// Sarun Intaralawan <https://github.com/sarunint>
|
||||
// Knut Erik Helgesen <https://github.com/knuthelgesen>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
export as namespace Croppie;
|
||||
@@ -26,6 +27,8 @@ declare class Croppie {
|
||||
result(options: Croppie.ResultOptions & { type: 'rawcanvas' }): Promise<HTMLCanvasElement>;
|
||||
result(options?: Croppie.ResultOptions): Promise<HTMLCanvasElement>;
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user