konva icon indicating copy to clipboard operation
konva copied to clipboard

TS2339: Property 'fillStyle' does not exist on type 'Context'.

Open catapop84 opened this issue 2 years ago • 3 comments

Trying konva with typescript on nodejs environment. I get this error from typescript

TS2339: Property 'fillStyle' does not exist on type 'Context'.

Checking Context.d.ts I see that indeed there's no fillStyle property.

catapop84 avatar May 30 '22 20:05 catapop84

Where exactly do you have this error? On what code usage?

lavrton avatar May 30 '22 21:05 lavrton

in a typescript project, when I try to create a custom share using Konva.Shape like in this example: https://konvajs.org/docs/shapes/Custom.html

 sceneFunc: function (context, shape) {
    context.fillStyle // this is marked with that error
  }

catapop84 avatar Jun 02 '22 13:06 catapop84

Do you want to create a Pull Request with the fix?

lavrton avatar Jun 02 '22 14:06 lavrton