chore: Update Typescript to 4.4.4 (#4188)

This commit is contained in:
Lipis 2021-11-02 14:24:16 +02:00 committed by GitHub
parent 60262cb4cc
commit 8d4f455cd3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
34 changed files with 132 additions and 125 deletions

View file

@ -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;