From 36d667fe1456221d2a617f4c8a85cf7c5c1cd742 Mon Sep 17 00:00:00 2001 From: Sidney Alcantara Date: Thu, 9 Sep 2021 18:37:04 +1000 Subject: [PATCH] update typescript to 4.4 for vs code inlay hints --- package.json | 2 +- src/hooks/useDoc.ts | 2 +- src/pages/Auth/JwtAuth.tsx | 2 +- yarn.lock | 8 ++++---- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index b2631661..0cb0cc35 100644 --- a/package.json +++ b/package.json @@ -61,7 +61,7 @@ "react-usestateref": "^1.0.5", "serve": "^11.3.2", "tinymce": "^5.2.0", - "typescript": "^4.3.5", + "typescript": "^4.4.2", "use-algolia": "^1.4.1", "use-debounce": "^3.3.0", "use-persisted-state": "^0.3.3", diff --git a/src/hooks/useDoc.ts b/src/hooks/useDoc.ts index 0bd7e1d7..75b71de6 100644 --- a/src/hooks/useDoc.ts +++ b/src/hooks/useDoc.ts @@ -64,7 +64,7 @@ const useDoc = ( if (options.createIfMissing) try { db.doc(documentState.path).set({}, { merge: true }); - } catch (e) { + } catch (e: any) { console.error( `Could not create ${documentState.path}`, e.message diff --git a/src/pages/Auth/JwtAuth.tsx b/src/pages/Auth/JwtAuth.tsx index 1bfd8013..022d2ce9 100644 --- a/src/pages/Auth/JwtAuth.tsx +++ b/src/pages/Auth/JwtAuth.tsx @@ -19,7 +19,7 @@ export default function JwtAuthPage() { await auth.signInWithCustomToken(jwt); enqueueSnackbar("Success", { variant: "success" }); window.location.assign("/"); - } catch (e) { + } catch (e: any) { enqueueSnackbar(e.message, { variant: "error" }); } finally { setLoading(false); diff --git a/yarn.lock b/yarn.lock index a3bad073..4b614d59 100644 --- a/yarn.lock +++ b/yarn.lock @@ -15973,10 +15973,10 @@ typedarray@^0.0.6: resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= -typescript@^4.3.5: - version "4.3.5" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.3.5.tgz#4d1c37cc16e893973c45a06886b7113234f119f4" - integrity sha512-DqQgihaQ9cUrskJo9kIyW/+g0Vxsk8cDtZ52a3NGh0YNTfpUSArXSohyUGnvbPazEPLu398C0UxmKSOrPumUzA== +typescript@^4.4.2: + version "4.4.2" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.4.2.tgz#6d618640d430e3569a1dfb44f7d7e600ced3ee86" + integrity sha512-gzP+t5W4hdy4c+68bfcv0t400HVJMMd2+H9B7gae1nQlBzCqvrXX+6GL/b3GAgyTH966pzrZ70/fRjwAtZksSQ== ua-parser-js@^0.7.18: version "0.7.28"