mirror of
https://github.com/konvajs/konva.git
synced 2025-06-28 15:23:44 +08:00
Merge pull request #527 from Ivanca/patch-1
TypeScript definitions: "setAttrs" must accept same arg than constructor
This commit is contained in:
commit
15fe72c642
16
konva.d.ts
vendored
16
konva.d.ts
vendored
@ -864,6 +864,7 @@ declare namespace Konva {
|
|||||||
|
|
||||||
class Ring extends Shape {
|
class Ring extends Shape {
|
||||||
constructor(RingConfig: RingConfig);
|
constructor(RingConfig: RingConfig);
|
||||||
|
setAttrs(attrs: RingConfig): void;
|
||||||
innerRadius(): number;
|
innerRadius(): number;
|
||||||
innerRadius(innerRadius: number): this;
|
innerRadius(innerRadius: number): this;
|
||||||
outerRadius(): number;
|
outerRadius(): number;
|
||||||
@ -879,6 +880,7 @@ declare namespace Konva {
|
|||||||
|
|
||||||
class Arc extends Shape {
|
class Arc extends Shape {
|
||||||
constructor(ArcConfig: ArcConfig);
|
constructor(ArcConfig: ArcConfig);
|
||||||
|
setAttrs(attrs: ArcConfig): void;
|
||||||
angle(): number;
|
angle(): number;
|
||||||
angle(angle: number): this;
|
angle(angle: number): this;
|
||||||
clockwise(): boolean;
|
clockwise(): boolean;
|
||||||
@ -895,6 +897,7 @@ declare namespace Konva {
|
|||||||
|
|
||||||
class Circle extends Shape {
|
class Circle extends Shape {
|
||||||
constructor(CircleConfig: CircleConfig);
|
constructor(CircleConfig: CircleConfig);
|
||||||
|
setAttrs(attrs: CircleConfig): void;
|
||||||
radius(): number;
|
radius(): number;
|
||||||
radius(radius: number): this;
|
radius(radius: number): this;
|
||||||
}
|
}
|
||||||
@ -905,6 +908,7 @@ declare namespace Konva {
|
|||||||
|
|
||||||
class Ellipse extends Shape {
|
class Ellipse extends Shape {
|
||||||
constructor(EllipseConfig: EllipseConfig);
|
constructor(EllipseConfig: EllipseConfig);
|
||||||
|
setAttrs(attrs: EllipseConfig): void;
|
||||||
radius(): any;
|
radius(): any;
|
||||||
radius(radius: any): this;
|
radius(radius: any): this;
|
||||||
radiusX(): number;
|
radiusX(): number;
|
||||||
@ -920,6 +924,7 @@ declare namespace Konva {
|
|||||||
|
|
||||||
class Image extends Shape {
|
class Image extends Shape {
|
||||||
constructor(ImageConfig: ImageConfig);
|
constructor(ImageConfig: ImageConfig);
|
||||||
|
setAttrs(attrs: ImageConfig): void;
|
||||||
image(): HTMLImageElement;
|
image(): HTMLImageElement;
|
||||||
image(image: HTMLImageElement): this;
|
image(image: HTMLImageElement): this;
|
||||||
crop(): SizeConfig;
|
crop(): SizeConfig;
|
||||||
@ -944,6 +949,7 @@ declare namespace Konva {
|
|||||||
|
|
||||||
class Line extends Shape {
|
class Line extends Shape {
|
||||||
constructor(LineConfig: LineConfig);
|
constructor(LineConfig: LineConfig);
|
||||||
|
setAttrs(attrs: LineConfig): void;
|
||||||
closed(): boolean;
|
closed(): boolean;
|
||||||
closed(closed: boolean): this;
|
closed(closed: boolean): this;
|
||||||
tension(): number;
|
tension(): number;
|
||||||
@ -963,6 +969,7 @@ declare namespace Konva {
|
|||||||
|
|
||||||
class Arrow extends Shape {
|
class Arrow extends Shape {
|
||||||
constructor(ArrowConfig: ArrowConfig);
|
constructor(ArrowConfig: ArrowConfig);
|
||||||
|
setAttrs(attrs: ArrowConfig): void;
|
||||||
closed(): boolean;
|
closed(): boolean;
|
||||||
closed(closed: boolean): this;
|
closed(closed: boolean): this;
|
||||||
tension(): number;
|
tension(): number;
|
||||||
@ -983,6 +990,7 @@ declare namespace Konva {
|
|||||||
|
|
||||||
class Rect extends Shape {
|
class Rect extends Shape {
|
||||||
constructor(RectConfig: RectConfig);
|
constructor(RectConfig: RectConfig);
|
||||||
|
setAttrs(attrs: RectConfig): void;
|
||||||
cornerRadius(): number;
|
cornerRadius(): number;
|
||||||
cornerRadius(cornerRadius: number): this;
|
cornerRadius(cornerRadius: number): this;
|
||||||
}
|
}
|
||||||
@ -997,6 +1005,7 @@ declare namespace Konva {
|
|||||||
|
|
||||||
class Sprite extends Shape {
|
class Sprite extends Shape {
|
||||||
constructor(SpriteConfig: SpriteConfig);
|
constructor(SpriteConfig: SpriteConfig);
|
||||||
|
setAttrs(attrs: SpriteConfig): void;
|
||||||
start(): void;
|
start(): void;
|
||||||
stop(): void;
|
stop(): void;
|
||||||
animation(): string;
|
animation(): string;
|
||||||
@ -1026,6 +1035,7 @@ declare namespace Konva {
|
|||||||
|
|
||||||
class Text extends Shape {
|
class Text extends Shape {
|
||||||
constructor(TextConfig: TextConfig);
|
constructor(TextConfig: TextConfig);
|
||||||
|
setAttrs(attrs: TextConfig): void;
|
||||||
getTextWidth(): number;
|
getTextWidth(): number;
|
||||||
getTextHeight(): number;
|
getTextHeight(): number;
|
||||||
text(): string;
|
text(): string;
|
||||||
@ -1060,6 +1070,7 @@ declare namespace Konva {
|
|||||||
|
|
||||||
class Wedge extends Shape {
|
class Wedge extends Shape {
|
||||||
constructor(WedgeConfig: WedgeConfig);
|
constructor(WedgeConfig: WedgeConfig);
|
||||||
|
setAttrs(attrs: WedgeConfig): void;
|
||||||
angle(): number;
|
angle(): number;
|
||||||
angle(angle: number): this;
|
angle(angle: number): this;
|
||||||
radius(): number;
|
radius(): number;
|
||||||
@ -1078,6 +1089,7 @@ declare namespace Konva {
|
|||||||
|
|
||||||
class Tag extends Shape {
|
class Tag extends Shape {
|
||||||
constructor(config: TagConfig);
|
constructor(config: TagConfig);
|
||||||
|
setAttrs(attrs: TagConfig): void;
|
||||||
pointerDirection(): string;
|
pointerDirection(): string;
|
||||||
pointerDirection(pointerDirection: string): this;
|
pointerDirection(pointerDirection: string): this;
|
||||||
pointerWidth(): number;
|
pointerWidth(): number;
|
||||||
@ -1102,6 +1114,7 @@ declare namespace Konva {
|
|||||||
|
|
||||||
class Path extends Shape {
|
class Path extends Shape {
|
||||||
constructor(PathConfig: PathConfig);
|
constructor(PathConfig: PathConfig);
|
||||||
|
setAttrs(attrs: PathConfig): void;
|
||||||
data(): string;
|
data(): string;
|
||||||
data(data: string): this;
|
data(data: string): this;
|
||||||
}
|
}
|
||||||
@ -1113,6 +1126,7 @@ declare namespace Konva {
|
|||||||
|
|
||||||
class RegularPolygon extends Shape {
|
class RegularPolygon extends Shape {
|
||||||
constructor(RegularPolygonConfig: RegularPolygonConfig);
|
constructor(RegularPolygonConfig: RegularPolygonConfig);
|
||||||
|
setAttrs(attrs: RegularPolygonConfig): void;
|
||||||
sides(): number;
|
sides(): number;
|
||||||
sides(sides: number): this;
|
sides(sides: number): this;
|
||||||
radius(): number;
|
radius(): number;
|
||||||
@ -1127,6 +1141,7 @@ declare namespace Konva {
|
|||||||
|
|
||||||
class Star extends Shape {
|
class Star extends Shape {
|
||||||
constructor(StarConfig: StarConfig);
|
constructor(StarConfig: StarConfig);
|
||||||
|
setAttrs(attrs: StarConfig): void;
|
||||||
numPoints(): number;
|
numPoints(): number;
|
||||||
numPoints(numPoints: number): this;
|
numPoints(numPoints: number): this;
|
||||||
innerRadius(): number;
|
innerRadius(): number;
|
||||||
@ -1145,6 +1160,7 @@ declare namespace Konva {
|
|||||||
|
|
||||||
class TextPath extends Shape {
|
class TextPath extends Shape {
|
||||||
constructor(TextPathConfig: TextPathConfig);
|
constructor(TextPathConfig: TextPathConfig);
|
||||||
|
setAttrs(attrs: TextPathConfig): void;
|
||||||
getTextWidth(): number;
|
getTextWidth(): number;
|
||||||
getTextHeight(): number;
|
getTextHeight(): number;
|
||||||
setText(text: string): void;
|
setText(text: string): void;
|
||||||
|
Loading…
Reference in New Issue
Block a user