From 3a3d094f8ade0e863f1f518abac1c516234d53fc Mon Sep 17 00:00:00 2001 From: Igor Babkin Date: Fri, 19 Oct 2018 19:11:01 +0300 Subject: [PATCH] Methods which return Konva.Collection have problems with generic typing #443 --- konva.d.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/konva.d.ts b/konva.d.ts index acb693d3..e4607f82 100644 --- a/konva.d.ts +++ b/konva.d.ts @@ -444,10 +444,10 @@ declare namespace Konva { clipHeight?: number; } - class Container extends Node { + class Container extends Node { constructor(params?: ContainerConfig); add(...children: Node[]): this; - getChildren(filterfunc?: Function): Collection; + getChildren(filterfunc?: Function): Collection; clip(): SizeConfig; clip(clip: SizeConfig | undefined | null): this; clipHeight(): number; @@ -461,7 +461,7 @@ declare namespace Konva { clipFunc(): (ctx: CanvasRenderingContext2D) => void; clipFunc(ctx: CanvasRenderingContext2D | undefined | null): void; destroyChildren(): void; - find(selector?: string | ((node: Node) => boolean)): Collection; + find(selector?: string | ((node: Node) => boolean)): Collection; findOne(selector: string | ((node: Node) => boolean)): T; getAllIntersections(pos: Vector2d): Shape[]; hasChildren(): boolean; @@ -677,7 +677,7 @@ declare namespace Konva { drawScene(): void; } - class Group extends Container {} + class Group extends Container {} interface CanvasConfig { width: number; @@ -1072,7 +1072,7 @@ declare namespace Konva { interface LabelInterface extends ContainerConfig {} - class Label extends Group { + class Label extends Group { constructor(LabelInterface: LabelInterface); getText(): Text; getTag(): Rect;