Skip to content

Commit

Permalink
🏷️ Convert interfaces to type aliases (#799)
Browse files Browse the repository at this point in the history
- πŸ”§ Convert Card interface to type alias in Comment.svelte
- πŸ”§ Convert Comment interface to type alias in commentStore.svelte.ts
- πŸ”§ Convert User interface to type alias in userStore.svelte.ts
  • Loading branch information
usagizmo authored Sep 13, 2024
1 parent 433142b commit bb86555
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions apps/web/src/lib/features/comment/Comment.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@
import type { Comment } from './commentStore.svelte';
import { commentStore } from './commentStore.svelte';
interface Card {
type Card = {
id: number;
me: boolean;
name: string;
createdAt: cdate.CDate;
message: string;
filePath: string | null;
}
};
let {
comment,
Expand Down
4 changes: 2 additions & 2 deletions apps/web/src/lib/features/comment/commentStore.svelte.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { supabase } from '$lib/supabase';

import { deleteCommentFile, uploadCommentFile } from './commentRequests';

export interface Comment {
export type Comment = {
id: number;
profiles: {
id: string;
Expand All @@ -14,7 +14,7 @@ export interface Comment {
text: string;
file_path: string | null;
created_at: string;
}
};

export const commentQuery = `
id,
Expand Down
4 changes: 2 additions & 2 deletions apps/web/src/lib/features/user/userStore.svelte.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ import snakecaseKeys from 'snakecase-keys';

import { supabase } from '$lib/supabase';

export interface User {
export type User = {
id: string;
email: string;
displayName: string;
bio: string;
createdAt: string;
}
};

class UserStore {
#user = $state<User | null>(null);
Expand Down

0 comments on commit bb86555

Please sign in to comment.