mirror of
https://github.com/konvajs/konva.git
synced 2025-06-28 15:23:44 +08:00
Merge pull request #399 from kingsquare/corrected-typescript
A few corrections to typescript definitions
This commit is contained in:
commit
78feb3edd2
15
konva.d.ts
vendored
15
konva.d.ts
vendored
@ -129,7 +129,17 @@ declare namespace Konva {
|
|||||||
height?: number;
|
height?: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
interface ToCanvasConfig extends SizeConfig {
|
||||||
|
callback: Function;
|
||||||
|
}
|
||||||
|
|
||||||
interface ToDataURLConfig extends SizeConfig {
|
interface ToDataURLConfig extends SizeConfig {
|
||||||
|
mimeType?: string;
|
||||||
|
quality?: number;
|
||||||
|
pixelRatio?: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface ToImageConfig extends SizeConfig {
|
||||||
callback: Function;
|
callback: Function;
|
||||||
mimeType?: string;
|
mimeType?: string;
|
||||||
quality?: number;
|
quality?: number;
|
||||||
@ -202,7 +212,7 @@ declare namespace Konva {
|
|||||||
getCanvas(): Canvas;
|
getCanvas(): Canvas;
|
||||||
getClassName(): string;
|
getClassName(): string;
|
||||||
getClientRect(): SizeConfig;
|
getClientRect(): SizeConfig;
|
||||||
getContext(): Context;
|
getContent(): HTMLDivElement;
|
||||||
getDepth(): number;
|
getDepth(): number;
|
||||||
getHeight(): number;
|
getHeight(): number;
|
||||||
getHitCanvas(): Canvas;
|
getHitCanvas(): Canvas;
|
||||||
@ -299,8 +309,9 @@ declare namespace Konva {
|
|||||||
threshold(): number;
|
threshold(): number;
|
||||||
threshold(threshold: number): this;
|
threshold(threshold: number): this;
|
||||||
to(params: any): void;
|
to(params: any): void;
|
||||||
|
toCanvas(config: ToCanvasConfig): HTMLCanvasElement;
|
||||||
toDataURL(config: ToDataURLConfig): string;
|
toDataURL(config: ToDataURLConfig): string;
|
||||||
toImage(config: ToDataURLConfig): HTMLImageElement;
|
toImage(config: ToImageConfig): HTMLImageElement;
|
||||||
toJSON(): string;
|
toJSON(): string;
|
||||||
toObject(): any;
|
toObject(): any;
|
||||||
transformsEnabled(): string;
|
transformsEnabled(): string;
|
||||||
|
Loading…
Reference in New Issue
Block a user