Skip to content

Commit

Permalink
chore: update gitignore and clean up types
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanhopperlowe committed Dec 17, 2024
1 parent 3314602 commit 811c1f1
Show file tree
Hide file tree
Showing 3 changed files with 633 additions and 621 deletions.
2 changes: 2 additions & 0 deletions ui/admin/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ node_modules
/public/build
.env
.idea/

.react-router/
5 changes: 2 additions & 3 deletions ui/admin/app/lib/service/routeService.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import queryString from "query-string";
import { $path, Routes, RoutesWithParams } from "safe-routes";
import { $path, type Routes, type RoutesWithParams } from "safe-routes";
import { ZodNull, ZodSchema, ZodType, z } from "zod";

// note: If you see a linter error related to `Routes`, or `RoutesWithParams`,
Expand Down Expand Up @@ -148,7 +148,7 @@ type RoutePathInfo<T extends keyof Routes> = T extends keyof RoutesWithParams
export type RouteInfo<T extends keyof Routes = keyof Routes> = {
path: T;
query: QueryInfo<T> | null;
pathParams: T extends keyof RoutesWithParams ? PathInfo<T> : unknown;
pathParams: RoutePathInfo<T>;
};

function convertToStringObject(obj: object) {
Expand Down Expand Up @@ -207,5 +207,4 @@ export const RouteService = {
getUnknownRouteInfo,
getRouteInfo,
getQueryParams,
getPathParams: $params,
};
Loading

0 comments on commit 811c1f1

Please sign in to comment.