chore: update Typescript to 5.9.3

This commit is contained in:
Christian Benincasa
2025-12-11 15:55:11 -05:00
parent dc3e932f53
commit 4c5ab4bc59
4 changed files with 231 additions and 225 deletions

View File

@@ -52,7 +52,7 @@
"overrides": {
"eslint": "9.17.0",
"@types/node": "22.10.7",
"typescript": "5.7.3"
"typescript": "5.9.3"
}
},
"lint-staged": {

444
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

View File

@@ -11,6 +11,7 @@ import {
useDeleteSmartCollection,
useSmartCollections,
} from '../../hooks/smartCollectionHooks.ts';
import type { RootSearchQueryParams } from '../../routes/__root.tsx';
import { Route } from '../../routes/__root.tsx';
import type { Maybe } from '../../types/util.ts';
import { RouterButtonLink } from '../base/RouterButtonLink.tsx';
@@ -76,7 +77,10 @@ export const SmartCollectionsTable = () => {
<RouterButtonLink
variant="contained"
to="/search"
search={(prev) => ({ ...prev, query: undefined })}
search={(prev: RootSearchQueryParams) => ({
...prev,
query: undefined,
})}
startIcon={<Search />}
>
Create

View File

@@ -19,13 +19,15 @@ const searchQuerySchema = z.object({
query: z.string().optional().catch(undefined),
});
export type RootSearchQueryParams = z.infer<typeof searchQuerySchema>;
export const Route = createRootRouteWithContext<RouterContext>()({
validateSearch: zodValidator(searchQuerySchema),
search: {
middlewares: [retainSearchParams(['query'])],
},
loader: async ({ context: { queryClient }, location: { search } }) => {
const parsed = search as z.infer<typeof searchQuerySchema>;
const parsed = search as RootSearchQueryParams;
if (!isNonEmptyString(parsed.query)) {
useStore.setState((s) => {
s.currentSearchRequest = null;