From bd21b9cf81dcdae0ebf52000a8d8a205e28fb32c Mon Sep 17 00:00:00 2001 From: Anton Lavrenov Date: Wed, 7 Aug 2019 18:45:55 +0700 Subject: [PATCH] types fixes --- src/Container.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Container.ts b/src/Container.ts index d3c9e5a6..a919a62d 100644 --- a/src/Container.ts +++ b/src/Container.ts @@ -533,7 +533,12 @@ export abstract class Container extends Node< clipY: GetSet; clipWidth: GetSet; clipHeight: GetSet; - clipFunc: GetSet<(ctx: CanvasRenderingContext2D, shape: this) => void, this>; + // there was "this" instead of "Container", + // but it breaks react-konva types: https://github.com/konvajs/react-konva/issues/390 + clipFunc: GetSet< + (ctx: CanvasRenderingContext2D, shape: Container) => void, + this + >; } // add getters setters