Skip to content
This repository has been archived by the owner on Aug 1, 2022. It is now read-only.

Property 'getDataURL' does not exist on type 'CanvasDraw' #143

Open
leeprobert opened this issue May 12, 2022 · 1 comment
Open

Property 'getDataURL' does not exist on type 'CanvasDraw' #143

leeprobert opened this issue May 12, 2022 · 1 comment

Comments

@leeprobert
Copy link

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.

@leeprobert
Copy link
Author

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');

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant