You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-12-16 08:02:25 +03:00
Specify return type for drawable promise
This commit is contained in:
@@ -25,7 +25,7 @@ export async function getDrawable(url: string): Promise<CanvasImageSource> {
|
||||
const blob = await response.blob();
|
||||
return await createImageBitmap(blob);
|
||||
} else {
|
||||
return new Promise((resolve, reject) => {
|
||||
return new Promise<HTMLImageElement>((resolve, reject) => {
|
||||
const img = document.createElement("img");
|
||||
img.crossOrigin = "anonymous";
|
||||
img.onload = function() {
|
||||
|
||||
Reference in New Issue
Block a user