The decodeFromImage() function accepts a string type as an argument. And this works as expected. However, when use TypeScript, actually setting the string type causes a type definition error.
Example:
const qrCodeBase64Str = 'data:image/png;base64...'
const qrCodeDecoder = new QrCodeDecoder()
qrCodeDecoder.decodeFromImage(qrCodeBase64Str).then((result) => console.log(result))
// => Error: "Argument of type 'string' is not assignable to parameter of type 'HTMLImageElement'."
This PR prevents the type definition error from occurring.
The decodeFromImage() function accepts a string type as an argument. And this works as expected. However, when use TypeScript, actually setting the string type causes a type definition error.
Example:
This PR prevents the type definition error from occurring.