mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-09-16 22:10:48 +02:00
chore: Update Typescript to 4.4.4 (#4188)
This commit is contained in:
@@ -24,7 +24,7 @@ const parseFileContents = async (blob: Blob | File) => {
|
||||
return await (
|
||||
await import(/* webpackChunkName: "image" */ "./image")
|
||||
).decodePngMetadata(blob);
|
||||
} catch (error) {
|
||||
} catch (error: any) {
|
||||
if (error.message === "INVALID") {
|
||||
throw new DOMException(
|
||||
t("alerts.imageDoesNotContainScene"),
|
||||
@@ -58,7 +58,7 @@ const parseFileContents = async (blob: Blob | File) => {
|
||||
).decodeSvgMetadata({
|
||||
svg: contents,
|
||||
});
|
||||
} catch (error) {
|
||||
} catch (error: any) {
|
||||
if (error.message === "INVALID") {
|
||||
throw new DOMException(
|
||||
t("alerts.imageDoesNotContainScene"),
|
||||
@@ -156,7 +156,7 @@ export const loadFromBlob = async (
|
||||
);
|
||||
|
||||
return result;
|
||||
} catch (error) {
|
||||
} catch (error: any) {
|
||||
console.error(error.message);
|
||||
throw new Error(t("alerts.couldNotLoadInvalidFile"));
|
||||
}
|
||||
@@ -187,7 +187,7 @@ export const canvasToBlob = async (
|
||||
}
|
||||
resolve(blob);
|
||||
});
|
||||
} catch (error) {
|
||||
} catch (error: any) {
|
||||
reject(error);
|
||||
}
|
||||
});
|
||||
@@ -208,7 +208,7 @@ export const generateIdFromFile = async (file: File) => {
|
||||
// convert to hex string
|
||||
.map((byte) => byte.toString(16).padStart(2, "0"))
|
||||
.join("") as FileId;
|
||||
} catch (error) {
|
||||
} catch (error: any) {
|
||||
console.error(error);
|
||||
// length 40 to align with the HEX length of SHA-1 (which is 160 bit)
|
||||
id = nanoid(40) as FileId;
|
||||
|
Reference in New Issue
Block a user