react-canvas-draw
react-canvas-draw copied to clipboard
Property 'getDataURL' does not exist on type 'CanvasDraw'
This is a typescript issue I think. I can see the method exists but it hasn't been added to the index.d.ts file that tells the compiler they are available. I tried to manually edit the file to include the signature but it still complains that:
Property 'getDataURL' does not exist on type 'CanvasDraw'
I think there are other methods missing from the type declaration. The Typescript support needs a bit of work.
This is how you can bypass the compiler issues for just that one line of code:
// @ts-ignore: Unreachable code error
let imageURL = canvasDrawRef.getDataURL('png', false, '0xffffff');