Open ghost opened 4 years ago
Hi, I'm facing the same issue in react-sketch and because of this production build is not working. Can you tell me how you added type declaration file manually?
I was playing around with this library and found later that an other framework was more what I needed. With better Typescript support. https://konvajs.org/
KonvaJS is fully compatable with Typescript and React and is better when you want to draw custom shapes. The only thing that is not supported is a textbox where you can type on the canvas. But you can accomplish that with a workaround. By making a input field with absulote position.
If you want to add a declaration file, you can edit the types file https://github.com/tbolis/react-sketch/tree/master/types and add the missing components.
Yes thanks for the suggestion and I did find the declaration file but I'm not able to run project. If possible can you tell me how you added type file manually ? Coz I'm not able to achieve it.
I was using Fabric.js and stumbeled upon your framework, I was rebuilding a lot of components and functionality that react-sketch allready contains. What I noticed is that when I run
npm i @types/react-sketch
npm cannot find a type declaration file. I added it by hand, I used the one in the types folder on the master branch and noticed that it only contained a declaration file forSketchField
and not the other components.Do you have a complete declaration file or should I make one?
List of components to add are: