Skip to content

Commit

Permalink
fixing the typecheck
Browse files Browse the repository at this point in the history
  • Loading branch information
invisal committed Apr 15, 2024
1 parent d3babd5 commit 8a0d38f
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 428 deletions.
2 changes: 1 addition & 1 deletion studio/src/app/connect/saved-connection-storage.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ApiUser } from "@studio/lib/api/api-database-response";
import { parseSafeJson } from "@libsqlstudio/gui";
import parseSafeJson from "@studio/lib/json-safe";

export interface DriverDetailField {
name: keyof SavedConnectionItemConfigConfig;
Expand Down
12 changes: 0 additions & 12 deletions studio/src/app/storybook/connection_error/page.tsx

This file was deleted.

9 changes: 0 additions & 9 deletions studio/src/app/storybook/opacity_loading/page.tsx

This file was deleted.

65 changes: 0 additions & 65 deletions studio/src/app/storybook/query_progress/page.tsx

This file was deleted.

13 changes: 13 additions & 0 deletions studio/src/lib/json-safe.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
export default function parseSafeJson<T = unknown>(
str: string | null | undefined,
defaultValue: T
): T {
if (!str) return defaultValue;

try {
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
return JSON.parse(str);
} catch {
return defaultValue;
}
}
77 changes: 0 additions & 77 deletions studio/src/lib/multiple-query.ts

This file was deleted.

104 changes: 0 additions & 104 deletions studio/src/lib/sql-execute-helper.ts

This file was deleted.

Loading

0 comments on commit 8a0d38f

Please sign in to comment.