diff --git a/package.json b/package.json index 091fb2fd..91b427ae 100644 --- a/package.json +++ b/package.json @@ -270,7 +270,7 @@ "react-scripts": "^5.0.1", "react-test-renderer": "18.2.0", "ts-node": "^10.9.1", - "typescript": "^5.3.3", + "typescript": "^5.5.4", "url-loader": "^4.1.1", "webpack": "^5.75.0", "webpack-bundle-analyzer": "^4.10.1", diff --git a/src/components/dialogs/ThreadgateEditor.tsx b/src/components/dialogs/ThreadgateEditor.tsx index 92dd157b..90483b3a 100644 --- a/src/components/dialogs/ThreadgateEditor.tsx +++ b/src/components/dialogs/ThreadgateEditor.tsx @@ -74,7 +74,9 @@ function DialogContent({ const onPressAudience = (setting: ThreadgateSetting) => { // remove nobody - let newSelected = draft.filter(v => v.type !== 'nobody') + let newSelected: ThreadgateSetting[] = draft.filter( + v => v.type !== 'nobody', + ) // toggle const i = newSelected.findIndex(v => isEqual(v, setting)) if (i === -1) { diff --git a/src/state/queries/post-feed.ts b/src/state/queries/post-feed.ts index 62ea0f33..1d6ec80d 100644 --- a/src/state/queries/post-feed.ts +++ b/src/state/queries/post-feed.ts @@ -375,11 +375,11 @@ export function usePostFeedQuery( } return undefined }) - .filter((n?: T): n is T => Boolean(n)), + .filter(n => !!n), } return feedPostSlice }) - .filter((n?: T): n is T => Boolean(n)), + .filter(n => !!n), })), ], } diff --git a/src/state/queries/threadgate.ts b/src/state/queries/threadgate.ts index c05d1f56..8b6aeba6 100644 --- a/src/state/queries/threadgate.ts +++ b/src/state/queries/threadgate.ts @@ -33,6 +33,6 @@ export function threadgateViewToSettings( } return setting }) - .filter((n?: T): n is T => Boolean(n)) + .filter(n => !!n) return settings } diff --git a/src/view/screens/Search/Explore.tsx b/src/view/screens/Search/Explore.tsx index e9b74452..5510fbee 100644 --- a/src/view/screens/Search/Explore.tsx +++ b/src/view/screens/Search/Explore.tsx @@ -119,7 +119,7 @@ function LoadMore({ } return loadMoreItem }) - .filter((n?: T): n is T => Boolean(n)) + .filter(n => !!n) }, [item.items, moderationOpts]) if (items.length === 0) return null diff --git a/yarn.lock b/yarn.lock index b99f9634..675fda4c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -21378,10 +21378,10 @@ typedarray-to-buffer@^3.1.5: dependencies: is-typedarray "^1.0.0" -typescript@^5.3.3: - version "5.3.3" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.3.3.tgz#b3ce6ba258e72e6305ba66f5c9b452aaee3ffe37" - integrity sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw== +typescript@^5.5.4: + version "5.5.4" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.5.4.tgz#d9852d6c82bad2d2eda4fd74a5762a8f5909e9ba" + integrity sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q== ua-parser-js@^0.7.33: version "0.7.35"