build(deps): update dependency typescript to v4.4.2 (#2321)

* build(deps): update dependency typescript to v4.4.2

* fix(web): cast try catch err type to error

Typescript 4.x changes the default behaviour of try catch and its err type from `any` to [`unknown`](https://github.com/microsoft/TypeScript/pull/41013).

This change ensures that where we rely on said variable it is cast accordingly as an `Error`.

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Amir Zarrinkafsh <nightah@me.com>
This commit is contained in:
renovate[bot] 2021-09-04 23:27:11 +10:00 committed by GitHub
parent 6b7b08d800
commit 5f2edf3d42
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 7 additions and 7 deletions

View File

@ -69,6 +69,6 @@
"prettier": "2.3.2",
"react-scripts": "4.0.3",
"react-test-renderer": "17.0.2",
"typescript": "4.3.5"
"typescript": "4.4.2"
}
}

View File

@ -21,7 +21,7 @@ export function useRemoteCall<Ret>(
setData(res);
} catch (err) {
console.error(err);
setError(err);
setError(err as Error);
}
})();
}, [setInProgress, setError, fnCallback]);

View File

@ -73,7 +73,7 @@ const ResetPasswordStep2 = function () {
setFormDisabled(true);
} catch (err) {
console.error(err);
if (err.message.includes("0000052D.")) {
if ((err as Error).message.includes("0000052D.")) {
createErrorNotification("Your supplied password does not meet the password policy requirements.");
} else {
createErrorNotification("There was an issue resetting the password.");

View File

@ -11189,10 +11189,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==
u2f-api@1.2.1:
version "1.2.1"