Specifying onClick event type with Typescript and React.Konva

后端 未结 5 633
借酒劲吻你
借酒劲吻你 2021-02-04 23:02

I\'m trying to get rid of my tslint error Type declaration of \'any\' loses type-safety. but I\'m struggling to figure out what the correct type would be for the Ev

5条回答
  •  孤独总比滥情好
    2021-02-04 23:54

    Taken from the ReactKonvaCore.d.ts file:

    onClick?(evt: Konva.KonvaEventObject): void;
    

    So, I'd say your event type is Konva.KonvaEventObject

提交回复
热议问题