From 1176da54be69f0432235786af532389962fd6802 Mon Sep 17 00:00:00 2001 From: viet nguyen Date: Fri, 22 Sep 2023 11:50:28 -0700 Subject: [PATCH] upgrade ts --- package.json | 4 ++-- src/js/auth/forOwnerOnly.ts | 2 +- yarn.lock | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index fd92a6e1a..dfd8e0140 100644 --- a/package.json +++ b/package.json @@ -117,7 +117,7 @@ "resize-observer-polyfill": "^1.5.1", "tailwindcss": "^3.1.8", "ts-standard": "^12.0.2", - "typescript": "4.9.5" + "typescript": "^5.2.2" }, "repository": { "type": "git", @@ -142,4 +142,4 @@ "engines": { "node": "18" } -} \ No newline at end of file +} diff --git a/src/js/auth/forOwnerOnly.ts b/src/js/auth/forOwnerOnly.ts index 51e3eb5f9..98f70cd86 100644 --- a/src/js/auth/forOwnerOnly.ts +++ b/src/js/auth/forOwnerOnly.ts @@ -9,7 +9,7 @@ import usePermissions from '../hooks/auth/usePermissions' * @param {P} props - The props passed to the function. * @returns {JSX.Element | null} - The JSX element returned by the function, or null. */ -type Fn

= (props: P) => JSX.Element | null +type Fn

= (props: P) => React.ReactNode | JSX.Element | null export type ForOwnerOnlyProps = Pick diff --git a/yarn.lock b/yarn.lock index a2ca20c3f..60b9306c4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8574,10 +8574,10 @@ typed-array-length@^1.0.4: for-each "^0.3.3" is-typed-array "^1.1.9" -typescript@4.9.5: - version "4.9.5" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.5.tgz#095979f9bcc0d09da324d58d03ce8f8374cbe65a" - integrity sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g== +typescript@^5.2.2: + version "5.2.2" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.2.2.tgz#5ebb5e5a5b75f085f22bc3f8460fba308310fa78" + integrity sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w== typesense@^1.2.1: version "1.7.1"