Skip to content

armgit / kaneo

Public Imported from GitHub
0

⚡ Project management that doesn't become the project. Boards, Gantt charts, and GitHub integration. Self-host it or use Kaneo Cloud.

refactor: change interface declarations to type aliases for consistency

Andrej Acevski72ae6c3907fd
diff --git a/apps/api/src/time-entry/controllers/update-time-entry.ts b/apps/api/src/time-entry/controllers/update-time-entry.ts
index 96786d538..dc824d8d6 100644
--- a/apps/api/src/time-entry/controllers/update-time-entry.ts
+++ b/apps/api/src/time-entry/controllers/update-time-entry.ts
@@ -3,12 +3,12 @@ import { HTTPException } from "hono/http-exception";
import db from "../../database";
import { timeEntryTable } from "../../database/schema";
-interface UpdateTimeEntryParams {
+type UpdateTimeEntryParams = {
timeEntryId: string;
startTime: Date;
endTime?: Date;
description?: string;
-}
+};
async function updateTimeEntry(params: UpdateTimeEntryParams) {
const { timeEntryId, startTime, endTime, description } = params;
diff --git a/apps/api/src/utils/workspace-access-middleware.ts b/apps/api/src/utils/workspace-access-middleware.ts
index 3d9cdaeba..786a6652d 100644
--- a/apps/api/src/utils/workspace-access-middleware.ts
+++ b/apps/api/src/utils/workspace-access-middleware.ts
@@ -14,9 +14,9 @@ type WorkspaceIdSource =
idKey: string;
};
-interface WorkspaceAccessMiddlewareConfig {
+type WorkspaceAccessMiddlewareConfig = {
sources: WorkspaceIdSource[];
-}
+};
export function workspaceAccessMiddleware(
config: WorkspaceAccessMiddlewareConfig,
diff --git a/apps/docs/components/section-separator.tsx b/apps/docs/components/section-separator.tsx
index 45ec5dc67..4f1c1378b 100644
--- a/apps/docs/components/section-separator.tsx
+++ b/apps/docs/components/section-separator.tsx
@@ -1,8 +1,8 @@
import type { ReactNode } from "react";
-interface SectionSeparatorProps {
+type SectionSeparatorProps = {
children: ReactNode;
-}
+};
export default function SectionSeparator({ children }: SectionSeparatorProps) {
return (
diff --git a/apps/docs/components/structured-data.tsx b/apps/docs/components/structured-data.tsx
index 82980f69c..2d4566310 100644
--- a/apps/docs/components/structured-data.tsx
+++ b/apps/docs/components/structured-data.tsx
@@ -1,6 +1,6 @@
import Script from "next/script";
-interface StructuredDataProps {
+type StructuredDataProps = {
type?: "organization" | "software" | "article" | "faq";
data?: {
title?: string;
@@ -13,7 +13,7 @@ interface StructuredDataProps {
answer: string;
}>;
};
-}
+};
export default function StructuredData({
type = "organization",
diff --git a/apps/docs/lib/og.tsx b/apps/docs/lib/og.tsx
index 54fc31762..da6c45906 100644
--- a/apps/docs/lib/og.tsx
+++ b/apps/docs/lib/og.tsx
@@ -3,12 +3,12 @@ import type { ImageResponseOptions } from "next/dist/compiled/@vercel/og/types";
import { ImageResponse } from "next/og";
import type { ReactElement, ReactNode } from "react";
-interface GenerateProps {
+type GenerateProps = {
title: ReactNode;
description?: ReactNode;
primaryTextColor?: string;
site?: string;
-}
+};
const font = readFileSync("./lib/Geist-Regular.ttf");
const fontBold = readFileSync("./lib/Geist-Bold.ttf");
diff --git a/apps/web/src/components/activity/comment-card.tsx b/apps/web/src/components/activity/comment-card.tsx
index cd187513f..48c85494b 100644
--- a/apps/web/src/components/activity/comment-card.tsx
+++ b/apps/web/src/components/activity/comment-card.tsx
@@ -50,7 +50,7 @@ import { getModifierKeyText } from "@/hooks/use-keyboard-shortcuts";
import { cn } from "@/lib/cn";
import { useUserPreferencesStore } from "@/store/user-preferences";
-interface CommentCardProps {
+type CommentCardProps = {
commentId: string;
taskId: string;
content: string;
@@ -61,7 +61,7 @@ interface CommentCardProps {
image?: string | null;
} | null;
createdAt: string;
-}
+};
export default function CommentCard({
commentId,
diff --git a/apps/web/src/components/activity/comment-input.tsx b/apps/web/src/components/activity/comment-input.tsx
index ae7a9fb82..3f6538f5a 100644
--- a/apps/web/src/components/activity/comment-input.tsx
+++ b/apps/web/src/components/activity/comment-input.tsx
@@ -40,9 +40,9 @@ import { getModifierKeyText } from "@/hooks/use-keyboard-shortcuts";
import { cn } from "@/lib/cn";
import { useUserPreferencesStore } from "@/store/user-preferences";
-interface CommentInputProps {
+type CommentInputProps = {
taskId: string;
-}
+};
export default function CommentInput({ taskId }: CommentInputProps) {
const { theme } = useUserPreferencesStore();
diff --git a/apps/web/src/components/auth/layout.tsx b/apps/web/src/components/auth/layout.tsx
index 040780c7f..2b07939e9 100644
--- a/apps/web/src/components/auth/layout.tsx
+++ b/apps/web/src/components/auth/layout.tsx
@@ -1,10 +1,10 @@
import { Logo } from "../common/logo";
-interface AuthLayoutProps {
+type AuthLayoutProps = {
children: React.ReactNode;
title: string;
subtitle?: string;
-}
+};
export function AuthLayout({ children, title, subtitle }: AuthLayoutProps) {
return (
diff --git a/apps/web/src/components/auth/toggle.tsx b/apps/web/src/components/auth/toggle.tsx
index 1103d706e..531984710 100644
--- a/apps/web/src/components/auth/toggle.tsx
+++ b/apps/web/src/components/auth/toggle.tsx
@@ -1,11 +1,11 @@
import { Link } from "@tanstack/react-router";
import useGetConfig from "@/hooks/queries/config/use-get-config";
-interface AuthToggleProps {
+type AuthToggleProps = {
message: string;
linkText: string;
linkTo: string;
-}
+};
export function AuthToggle({ message, linkText, linkTo }: AuthToggleProps) {
const { data: config } = useGetConfig();
diff --git a/apps/web/src/components/backlog-list-view/backlog-task-row.tsx b/apps/web/src/components/backlog-list-view/backlog-task-row.tsx
index ec31d04b9..393fb36bc 100644
--- a/apps/web/src/components/backlog-list-view/backlog-task-row.tsx
+++ b/apps/web/src/components/backlog-list-view/backlog-task-row.tsx
@@ -30,9 +30,9 @@ import TaskCardContextMenuContent from "../kanban-board/task-card-context-menu/t
import TaskCardLabels from "../kanban-board/task-labels";
import { ContextMenu, ContextMenuTrigger } from "../ui/context-menu";
-interface BacklogTaskRowProps {
+type BacklogTaskRowProps = {
task: Task;
-}
+};
export default function BacklogTaskRow({ task }: BacklogTaskRowProps) {
const navigate = useNavigate();
diff --git a/apps/web/src/components/backlog-list-view/index.tsx b/apps/web/src/components/backlog-list-view/index.tsx
index 1d9974b42..5e7800980 100644
--- a/apps/web/src/components/backlog-list-view/index.tsx
+++ b/apps/web/src/components/backlog-list-view/index.tsx
@@ -31,9 +31,9 @@ import type Task from "@/types/task";
import CreateTaskModal from "../shared/modals/create-task-modal";
import BacklogTaskRow from "./backlog-task-row";
-interface BacklogListViewProps {
+type BacklogListViewProps = {
project?: ProjectWithTasks;
-}
+};
function BacklogListView({ project }: BacklogListViewProps) {
const { mutate: updateTask } = useUpdateTask();
diff --git a/apps/web/src/components/common/layout.tsx b/apps/web/src/components/common/layout.tsx
index e280b1556..db3a80ba1 100644
--- a/apps/web/src/components/common/layout.tsx
+++ b/apps/web/src/components/common/layout.tsx
@@ -8,20 +8,20 @@ import { useUserPreferencesEffects } from "@/hooks/use-user-preferences-effects"
import { cn } from "@/lib/cn";
import { useUserPreferencesStore } from "@/store/user-preferences";
-interface LayoutProps {
+type LayoutProps = {
children: ReactNode;
className?: string;
-}
+};
-interface HeaderProps {
+type HeaderProps = {
children: ReactNode;
className?: string;
-}
+};
-interface ContentProps {
+type ContentProps = {
children: ReactNode;
className?: string;
-}
+};
function LayoutHeader({ children, className }: HeaderProps) {
return (
diff --git a/apps/web/src/components/common/logo.tsx b/apps/web/src/components/common/logo.tsx
index c984a09f3..e1c26bcf2 100644
--- a/apps/web/src/components/common/logo.tsx
+++ b/apps/web/src/components/common/logo.tsx
@@ -1,9 +1,9 @@
import { Link } from "@tanstack/react-router";
import useProjectStore from "@/store/project";
-interface LogoProps {
+type LogoProps = {
className?: string;
-}
+};
export function Logo({ className = "" }: LogoProps) {
const { setProject } = useProjectStore();
diff --git a/apps/web/src/components/common/project-layout.tsx b/apps/web/src/components/common/project-layout.tsx
index 08d9d1d0c..e824f78ed 100644
--- a/apps/web/src/components/common/project-layout.tsx
+++ b/apps/web/src/components/common/project-layout.tsx
@@ -25,12 +25,12 @@ import useGetProject from "@/hooks/queries/project/use-get-project";
import useActiveWorkspace from "@/hooks/queries/workspace/use-active-workspace";
import { cn } from "@/lib/cn";
-interface ProjectLayoutProps {
+type ProjectLayoutProps = {
projectId: string;
workspaceId: string;
headerActions?: ReactNode;
children: ReactNode;
-}
+};
export default function ProjectLayout({
projectId,
diff --git a/apps/web/src/components/common/task-layout.tsx b/apps/web/src/components/common/task-layout.tsx
index 4c6133670..1c9e16dc9 100644
--- a/apps/web/src/components/common/task-layout.tsx
+++ b/apps/web/src/components/common/task-layout.tsx
@@ -21,14 +21,14 @@ import useGetProject from "@/hooks/queries/project/use-get-project";
import useGetTask from "@/hooks/queries/task/use-get-task";
import useActiveWorkspace from "@/hooks/queries/workspace/use-active-workspace";
-interface TaskLayoutProps {
+type TaskLayoutProps = {
taskId: string;
projectId: string;
workspaceId: string;
headerActions?: ReactNode;
children: ReactNode;
rightSidebar?: ReactNode;
-}
+};
export default function TaskLayout({
taskId,
diff --git a/apps/web/src/components/common/workspace-layout.tsx b/apps/web/src/components/common/workspace-layout.tsx
index f63e613bf..79d58daef 100644
--- a/apps/web/src/components/common/workspace-layout.tsx
+++ b/apps/web/src/components/common/workspace-layout.tsx
@@ -21,13 +21,13 @@ import { shortcuts } from "@/constants/shortcuts";
import useActiveWorkspace from "@/hooks/queries/workspace/use-active-workspace";
import { cn } from "@/lib/cn";
-interface WorkspaceLayoutProps {
+type WorkspaceLayoutProps = {
title: string;
headerActions?: ReactNode;
children: ReactNode;
onCreateProject?: () => void;
className?: string;
-}
+};
export default function WorkspaceLayout({
title,
diff --git a/apps/web/src/components/kanban-board/column/column-dropzone.tsx b/apps/web/src/components/kanban-board/column/column-dropzone.tsx
index 9d72c598a..867c876ae 100644
--- a/apps/web/src/components/kanban-board/column/column-dropzone.tsx
+++ b/apps/web/src/components/kanban-board/column/column-dropzone.tsx
@@ -7,10 +7,10 @@ import { useEffect } from "react";
import type { ProjectWithTasks } from "@/types/project";
import TaskCard from "../task-card";
-interface ColumnDropzoneProps {
+type ColumnDropzoneProps = {
column: ProjectWithTasks["columns"][number];
onIsOverChange?: (isOver: boolean) => void;
-}
+};
export function ColumnDropzone({
column,
diff --git a/apps/web/src/components/kanban-board/column/column-footer.tsx b/apps/web/src/components/kanban-board/column/column-footer.tsx
index dc8b05087..0eb3144e1 100644
--- a/apps/web/src/components/kanban-board/column/column-footer.tsx
+++ b/apps/web/src/components/kanban-board/column/column-footer.tsx
@@ -4,9 +4,9 @@ import CreateTaskModal from "@/components/shared/modals/create-task-modal";
import toKebabCase from "@/lib/to-kebab-case";
import type { ProjectWithTasks } from "@/types/project";
-interface ColumnFooterProps {
+type ColumnFooterProps = {
column: ProjectWithTasks["columns"][number];
-}
+};
export function ColumnFooter({ column }: ColumnFooterProps) {
const [isTaskModalOpen, setIsTaskModalOpen] = useState(false);
diff --git a/apps/web/src/components/kanban-board/column/column-header.tsx b/apps/web/src/components/kanban-board/column/column-header.tsx
index 9a0e65783..e0c4b8a29 100644
--- a/apps/web/src/components/kanban-board/column/column-header.tsx
+++ b/apps/web/src/components/kanban-board/column/column-header.tsx
@@ -6,9 +6,9 @@ import { getColumnIcon } from "@/lib/column";
import useProjectStore from "@/store/project";
import type { ProjectWithTasks } from "@/types/project";
-interface ColumnHeaderProps {
+type ColumnHeaderProps = {
column: ProjectWithTasks["columns"][number];
-}
+};
export function ColumnHeader({ column }: ColumnHeaderProps) {
const { project, setProject } = useProjectStore();
diff --git a/apps/web/src/components/kanban-board/column/index.tsx b/apps/web/src/components/kanban-board/column/index.tsx
index 171c1d1cb..7b815de78 100644
--- a/apps/web/src/components/kanban-board/column/index.tsx
+++ b/apps/web/src/components/kanban-board/column/index.tsx
@@ -6,9 +6,9 @@ import type { ProjectWithTasks } from "@/types/project";
import { ColumnDropzone } from "./column-dropzone";
import { ColumnHeader } from "./column-header";
-interface ColumnProps {
+type ColumnProps = {
column: ProjectWithTasks["columns"][number];
-}
+};
function Column({ column }: ColumnProps) {
const [isTaskModalOpen, setIsTaskModalOpen] = useState(false);
diff --git a/apps/web/src/components/kanban-board/task-card-context-menu/task-card-context-menu-content.tsx b/apps/web/src/components/kanban-board/task-card-context-menu/task-card-context-menu-content.tsx
index 7a077114b..48822c626 100644
--- a/apps/web/src/components/kanban-board/task-card-context-menu/task-card-context-menu-content.tsx
+++ b/apps/web/src/components/kanban-board/task-card-context-menu/task-card-context-menu-content.tsx
@@ -24,16 +24,16 @@ import { generateLink } from "@/lib/generate-link";
import { getPriorityIcon } from "@/lib/priority";
import type Task from "@/types/task";
-interface TaskCardContext {
+type TaskCardContext = {
worskpaceId: string;
projectId: string;
-}
+};
-interface TaskCardContextMenuContentProps {
+type TaskCardContextMenuContentProps = {
task: Task;
taskCardContext: TaskCardContext;
onDeleteClick: () => void;
-}
+};
export default function TaskCardContextMenuContent({
task,
diff --git a/apps/web/src/components/kanban-board/task-card.tsx b/apps/web/src/components/kanban-board/task-card.tsx
index 08d9be6ca..7f52e0028 100644
--- a/apps/web/src/components/kanban-board/task-card.tsx
+++ b/apps/web/src/components/kanban-board/task-card.tsx
@@ -29,9 +29,9 @@ import { ContextMenu, ContextMenuTrigger } from "../ui/context-menu";
import TaskCardContextMenuContent from "./task-card-context-menu/task-card-context-menu-content";
import TaskCardLabels from "./task-labels";
-interface TaskCardProps {
+type TaskCardProps = {
task: Task;
-}
+};
function TaskCard({ task }: TaskCardProps) {
const {
diff --git a/apps/web/src/components/list-view/task-row.tsx b/apps/web/src/components/list-view/task-row.tsx
index be9ab7803..d75914d61 100644
--- a/apps/web/src/components/list-view/task-row.tsx
+++ b/apps/web/src/components/list-view/task-row.tsx
@@ -30,10 +30,10 @@ import TaskCardContextMenuContent from "../kanban-board/task-card-context-menu/t
import TaskCardLabels from "../kanban-board/task-labels";
import { ContextMenu, ContextMenuTrigger } from "../ui/context-menu";
-interface TaskRowProps {
+type TaskRowProps = {
task: Task;
projectSlug: string;
-}
+};
function TaskRow({ task, projectSlug }: TaskRowProps) {
const navigate = useNavigate();
diff --git a/apps/web/src/components/notification/notification-dropdown.tsx b/apps/web/src/components/notification/notification-dropdown.tsx
index 853d559b8..4ba1cff92 100644
--- a/apps/web/src/components/notification/notification-dropdown.tsx
+++ b/apps/web/src/components/notification/notification-dropdown.tsx
@@ -32,9 +32,9 @@ import useGetNotifications from "@/hooks/queries/notification/use-get-notificati
import { useRegisterShortcuts } from "@/hooks/use-keyboard-shortcuts";
import { cn } from "@/lib/cn";
-export interface NotificationDropdownRef {
+export type NotificationDropdownRef = {
toggle: () => void;
-}
+};
const NotificationDropdown = forwardRef<NotificationDropdownRef>(
(_props, ref) => {
diff --git a/apps/web/src/components/page-title.tsx b/apps/web/src/components/page-title.tsx
index dcbb883b5..a3dd12342 100644
--- a/apps/web/src/components/page-title.tsx
+++ b/apps/web/src/components/page-title.tsx
@@ -1,10 +1,10 @@
import { useEffect } from "react";
-interface PageTitleProps {
+type PageTitleProps = {
title: string;
suffix?: string;
hideAppName?: boolean;
-}
+};
export default function PageTitle({
title,
diff --git a/apps/web/src/components/project/tasks-import-export.tsx b/apps/web/src/components/project/tasks-import-export.tsx
index cf0479196..fdb47b1f4 100644
--- a/apps/web/src/components/project/tasks-import-export.tsx
+++ b/apps/web/src/components/project/tasks-import-export.tsx
@@ -10,9 +10,9 @@ import useImportTasks from "@/hooks/mutations/task/use-import-tasks";
import { cn } from "@/lib/cn";
import type { ProjectWithTasks } from "@/types/project";
-interface TasksImportExportProps {
+type TasksImportExportProps = {
project: ProjectWithTasks;
-}
+};
export function TasksImportExport({ project }: TasksImportExportProps) {
const [isImportOpen, setIsImportOpen] = useState(false);
diff --git a/apps/web/src/components/public-project/kanban-view.tsx b/apps/web/src/components/public-project/kanban-view.tsx
index 96eeab6de..b6181de07 100644
--- a/apps/web/src/components/public-project/kanban-view.tsx
+++ b/apps/web/src/components/public-project/kanban-view.tsx
@@ -4,17 +4,17 @@ import type { ProjectWithTasks } from "@/types/project";
import type Task from "@/types/task";
import { PublicTaskCard } from "./task-card";
-interface Column {
+type Column = {
id: string;
name: string;
icon: LucideIcon;
tasks: Task[];
-}
+};
-interface PublicKanbanViewProps {
+type PublicKanbanViewProps = {
project: ProjectWithTasks;
onTaskClick: (task: Task) => void;
-}
+};
export function PublicKanbanView({
project,
diff --git a/apps/web/src/components/public-project/list-view.tsx b/apps/web/src/components/public-project/list-view.tsx
index cb767b673..6a664e3d0 100644
--- a/apps/web/src/components/public-project/list-view.tsx
+++ b/apps/web/src/components/public-project/list-view.tsx
@@ -4,17 +4,17 @@ import type { ProjectWithTasks } from "@/types/project";
import type Task from "@/types/task";
import { PublicTaskRow } from "./task-row";
-interface Column {
+type Column = {
id: string;
name: string;
icon: LucideIcon;
tasks: Task[];
-}
+};
-interface PublicListViewProps {
+type PublicListViewProps = {
project: ProjectWithTasks;
onTaskClick: (task: Task) => void;
-}
+};
export function PublicListView({ project, onTaskClick }: PublicListViewProps) {
const columns: Column[] = DEFAULT_COLUMNS.map((column) => ({
diff --git a/apps/web/src/components/public-project/task-card.tsx b/apps/web/src/components/public-project/task-card.tsx
index 239fd562b..cefb39437 100644
--- a/apps/web/src/components/public-project/task-card.tsx
+++ b/apps/web/src/components/public-project/task-card.tsx
@@ -5,11 +5,11 @@ import { priorityColorsTaskCard } from "@/constants/priority-colors";
import { cn } from "@/lib/cn";
import type Task from "@/types/task";
-interface PublicTaskCardProps {
+type PublicTaskCardProps = {
task: Task;
projectSlug: string;
onTaskClick: (task: Task) => void;
-}
+};
export function PublicTaskCard({
task,
diff --git a/apps/web/src/components/public-project/task-detail-modal.tsx b/apps/web/src/components/public-project/task-detail-modal.tsx
index 481df6c23..6eb8156fd 100644
--- a/apps/web/src/components/public-project/task-detail-modal.tsx
+++ b/apps/web/src/components/public-project/task-detail-modal.tsx
@@ -6,12 +6,12 @@ import { priorityColorsTaskCard } from "@/constants/priority-colors";
import { cn } from "@/lib/cn";
import type Task from "@/types/task";
-interface PublicTaskDetailModalProps {
+type PublicTaskDetailModalProps = {
task: Task | null;
projectSlug: string;
open: boolean;
onOpenChange: (open: boolean) => void;
-}
+};
export function PublicTaskDetailModal({
task,
diff --git a/apps/web/src/components/public-project/task-row.tsx b/apps/web/src/components/public-project/task-row.tsx
index 7142f9df4..e1163831c 100644
--- a/apps/web/src/components/public-project/task-row.tsx
+++ b/apps/web/src/components/public-project/task-row.tsx
@@ -5,11 +5,11 @@ import { dueDateStatusColors, getDueDateStatus } from "@/lib/due-date-status";
import { getPriorityIcon } from "@/lib/priority";
import type Task from "@/types/task";
-interface PublicTaskRowProps {
+type PublicTaskRowProps = {
task: Task;
projectSlug: string;
onTaskClick: (task: Task) => void;
-}
+};
export function PublicTaskRow({
task,
diff --git a/apps/web/src/components/settings-layout.tsx b/apps/web/src/components/settings-layout.tsx
index 5f87666f9..18f27d77e 100644
--- a/apps/web/src/components/settings-layout.tsx
+++ b/apps/web/src/components/settings-layout.tsx
@@ -22,7 +22,7 @@ import {
import { shortcuts } from "@/constants/shortcuts";
import { cn } from "@/lib/cn";
-interface SettingsLayoutProps {
+type SettingsLayoutProps = {
title: string;
description?: string;
icon?: ReactNode;
@@ -30,7 +30,7 @@ interface SettingsLayoutProps {
backLabel?: string;
children: ReactNode;
className?: string;
-}
+};
export function SettingsLayout({
title,
@@ -120,13 +120,13 @@ export function SettingsLayout({
);
}
-interface SettingsSectionProps {
+type SettingsSectionProps = {
title: string;
description?: string;
icon?: ReactNode;
children: ReactNode;
className?: string;
-}
+};
export function SettingsSection({
title,
@@ -155,11 +155,11 @@ export function SettingsSection({
);
}
-interface DangerZoneSectionProps {
+type DangerZoneSectionProps = {
title: string;
description: string;
children: ReactNode;
-}
+};
export function DangerZoneSection({
title,
diff --git a/apps/web/src/components/settings/api-key-created-modal.tsx b/apps/web/src/components/settings/api-key-created-modal.tsx
index d525eef07..2c3e2934c 100644
--- a/apps/web/src/components/settings/api-key-created-modal.tsx
+++ b/apps/web/src/components/settings/api-key-created-modal.tsx
@@ -12,12 +12,12 @@ import {
DialogTitle,
} from "../ui/dialog";
-interface ApiKeyCreatedModalProps {
+type ApiKeyCreatedModalProps = {
apiKey: string;
keyName: string;
open: boolean;
onClose: () => void;
-}
+};
export function ApiKeyCreatedModal({
apiKey,
diff --git a/apps/web/src/components/settings/api-key-table.tsx b/apps/web/src/components/settings/api-key-table.tsx
index 1e4026818..acbbca56f 100644
--- a/apps/web/src/components/settings/api-key-table.tsx
+++ b/apps/web/src/components/settings/api-key-table.tsx
@@ -13,10 +13,10 @@ import {
TableRow,
} from "../ui/table";
-interface ApiKeyTableProps {
+type ApiKeyTableProps = {
apiKeys: ApiKey[];
isLoading: boolean;
-}
+};
export function ApiKeyTable({ apiKeys, isLoading }: ApiKeyTableProps) {
const { mutateAsync: deleteApiKey } = useDeleteApiKey();
diff --git a/apps/web/src/components/settings/create-api-key-dialog.tsx b/apps/web/src/components/settings/create-api-key-dialog.tsx
index 8646b6296..cd06d1972 100644
--- a/apps/web/src/components/settings/create-api-key-dialog.tsx
+++ b/apps/web/src/components/settings/create-api-key-dialog.tsx
@@ -34,11 +34,11 @@ const createApiKeySchema = z.object({
type FormValues = z.infer<typeof createApiKeySchema>;
-interface CreateApiKeyDialogProps {
+type CreateApiKeyDialogProps = {
open: boolean;
onClose: () => void;
onSuccess: (data: CreateApiKeyResponse) => void;
-}
+};
export function CreateApiKeyDialog({
open,
diff --git a/apps/web/src/components/shared/modals/create-task-modal.tsx b/apps/web/src/components/shared/modals/create-task-modal.tsx
index 3db6f5fa8..6f5d4c15b 100644
--- a/apps/web/src/components/shared/modals/create-task-modal.tsx
+++ b/apps/web/src/components/shared/modals/create-task-modal.tsx
@@ -44,11 +44,11 @@ import { cn } from "@/lib/cn";
import { getPriorityIcon } from "@/lib/priority";
import useProjectStore from "@/store/project";
-interface CreateTaskModalProps {
+type CreateTaskModalProps = {
open: boolean;
onClose: () => void;
status?: string;
-}
+};
type Priority = "no-priority" | "low" | "medium" | "high" | "urgent";
diff --git a/apps/web/src/components/shared/modals/create-workspace-modal.tsx b/apps/web/src/components/shared/modals/create-workspace-modal.tsx
index c573ce469..930b22f51 100644
--- a/apps/web/src/components/shared/modals/create-workspace-modal.tsx
+++ b/apps/web/src/components/shared/modals/create-workspace-modal.tsx
@@ -21,10 +21,10 @@ import { Input } from "@/components/ui/input";
import useCreateWorkspace from "@/hooks/queries/workspace/use-create-workspace";
import { useUserPreferencesStore } from "@/store/user-preferences";
-interface CreateWorkspaceModalProps {
+type CreateWorkspaceModalProps = {
open: boolean;
onClose: () => void;
-}
+};
function CreateWorkspaceModal({ open, onClose }: CreateWorkspaceModalProps) {
const [name, setName] = useState("");
diff --git a/apps/web/src/components/task/task-assignee-popover.tsx b/apps/web/src/components/task/task-assignee-popover.tsx
index 803452753..c72dbecc8 100644
--- a/apps/web/src/components/task/task-assignee-popover.tsx
+++ b/apps/web/src/components/task/task-assignee-popover.tsx
@@ -12,11 +12,11 @@ import { useUpdateTaskAssignee } from "@/hooks/mutations/task/use-update-task-as
import { useGetActiveWorkspaceUsers } from "@/hooks/queries/workspace-users/use-get-active-workspace-users";
import type Task from "@/types/task";
-interface TaskAssigneePopoverProps {
+type TaskAssigneePopoverProps = {
task: Task;
workspaceId: string;
children: React.ReactNode;
-}
+};
export default function TaskAssigneePopover({
task,
diff --git a/apps/web/src/components/task/task-description-editor.tsx b/apps/web/src/components/task/task-description-editor.tsx
index f499bffc4..56eec0753 100644
--- a/apps/web/src/components/task/task-description-editor.tsx
+++ b/apps/web/src/components/task/task-description-editor.tsx
@@ -37,11 +37,11 @@ import { getModifierKeyText } from "@/hooks/use-keyboard-shortcuts";
import { cn } from "@/lib/cn";
import { useUserPreferencesStore } from "@/store/user-preferences";
-interface TaskDescriptionEditorProps {
+type TaskDescriptionEditorProps = {
value: string;
onChange: (value: string) => void;
placeholder?: string;
-}
+};
export default function TaskDescriptionEditor({
value: _value,
diff --git a/apps/web/src/components/task/task-description.tsx b/apps/web/src/components/task/task-description.tsx
index 008fd01ce..17bd087f1 100644
--- a/apps/web/src/components/task/task-description.tsx
+++ b/apps/web/src/components/task/task-description.tsx
@@ -42,9 +42,9 @@ import { cn } from "@/lib/cn";
import debounce from "@/lib/debounce";
import { useUserPreferencesStore } from "@/store/user-preferences";
-interface TaskDescriptionProps {
+type TaskDescriptionProps = {
taskId: string;
-}
+};
export default function TaskDescription({ taskId }: TaskDescriptionProps) {
const { data: task } = useGetTask(taskId);
diff --git a/apps/web/src/components/task/task-due-date-popover.tsx b/apps/web/src/components/task/task-due-date-popover.tsx
index c2d018e46..c46151edf 100644
--- a/apps/web/src/components/task/task-due-date-popover.tsx
+++ b/apps/web/src/components/task/task-due-date-popover.tsx
@@ -9,10 +9,10 @@ import {
import { useUpdateTaskDueDate } from "@/hooks/mutations/task/use-update-task-due-date";
import type Task from "@/types/task";
-interface TaskDueDatePopoverProps {
+type TaskDueDatePopoverProps = {
task: Task;
children: React.ReactNode;
-}
+};
export default function TaskDueDatePopover({
task,
diff --git a/apps/web/src/components/task/task-labels-popover.tsx b/apps/web/src/components/task/task-labels-popover.tsx
index d546a4ed3..6fc01b48f 100644
--- a/apps/web/src/components/task/task-labels-popover.tsx
+++ b/apps/web/src/components/task/task-labels-popover.tsx
@@ -38,11 +38,11 @@ type LabelColor =
| "pink"
| "red";
-interface TaskLabelsPopoverProps {
+type TaskLabelsPopoverProps = {
task: Task;
workspaceId: string;
children: React.ReactNode;
-}
+};
type PopoverStep = "select" | "color";
diff --git a/apps/web/src/components/task/task-priority-popover.tsx b/apps/web/src/components/task/task-priority-popover.tsx
index 4c84795bc..caf39cef9 100644
--- a/apps/web/src/components/task/task-priority-popover.tsx
+++ b/apps/web/src/components/task/task-priority-popover.tsx
@@ -11,10 +11,10 @@ import { useUpdateTaskPriority } from "@/hooks/mutations/task/use-update-task-st
import { getPriorityIcon } from "@/lib/priority";
import type Task from "@/types/task";
-interface TaskPriorityPopoverProps {
+type TaskPriorityPopoverProps = {
task: Task;
children: React.ReactNode;
-}
+};
const priorityOptions = [
{ value: "no-priority", label: "No Priority" },
diff --git a/apps/web/src/components/task/task-status-popover.tsx b/apps/web/src/components/task/task-status-popover.tsx
index 1cd6694fb..44b672ee6 100644
--- a/apps/web/src/components/task/task-status-popover.tsx
+++ b/apps/web/src/components/task/task-status-popover.tsx
@@ -11,10 +11,10 @@ import { useUpdateTaskStatus } from "@/hooks/mutations/task/use-update-task-stat
import { getColumnIcon } from "@/lib/column";
import type Task from "@/types/task";
-interface TaskStatusPopoverProps {
+type TaskStatusPopoverProps = {
task: Task;
children: React.ReactNode;
-}
+};
const statusOptions = [
{ value: "to-do", label: "To Do" },
diff --git a/apps/web/src/components/task/task-title.tsx b/apps/web/src/components/task/task-title.tsx
index 7d18998dc..4c44cf0c4 100644
--- a/apps/web/src/components/task/task-title.tsx
+++ b/apps/web/src/components/task/task-title.tsx
@@ -7,9 +7,9 @@ import { useUpdateTaskTitle } from "@/hooks/mutations/task/use-update-task-title
import useGetTask from "@/hooks/queries/task/use-get-task";
import debounce from "@/lib/debounce";
-interface TaskTitleProps {
+type TaskTitleProps = {
taskId: string;
-}
+};
export default function TaskTitle({ taskId }: TaskTitleProps) {
const { data: task } = useGetTask(taskId);
diff --git a/apps/web/src/components/ui/badge.tsx b/apps/web/src/components/ui/badge.tsx
index 08877e885..2aae2a6e5 100644
--- a/apps/web/src/components/ui/badge.tsx
+++ b/apps/web/src/components/ui/badge.tsx
@@ -23,9 +23,8 @@ const badgeVariants = cva(
},
);
-export interface BadgeProps
- extends React.HTMLAttributes<HTMLDivElement>,
- VariantProps<typeof badgeVariants> {}
+export type BadgeProps = React.HTMLAttributes<HTMLDivElement> &
+ VariantProps<typeof badgeVariants>;
function Badge({ className, variant, ...props }: BadgeProps) {
return (
diff --git a/apps/web/src/components/ui/combobox.tsx b/apps/web/src/components/ui/combobox.tsx
index 7075af18d..df1e24bc9 100644
--- a/apps/web/src/components/ui/combobox.tsx
+++ b/apps/web/src/components/ui/combobox.tsx
@@ -17,13 +17,13 @@ import {
} from "@/components/ui/popover";
import { cn } from "@/lib/cn";
-export interface ComboboxOption {
+export type ComboboxOption = {
value: string;
label: string;
icon?: React.ReactNode;
-}
+};
-export interface ComboboxProps {
+export type ComboboxProps = {
options: ComboboxOption[];
value?: string;
onValueChange?: (value: string) => void;
@@ -40,7 +40,7 @@ export interface ComboboxProps {
| "ghost"
| "link";
size?: "default" | "sm" | "xs";
-}
+};
export function Combobox({
options,
diff --git a/apps/web/src/components/ui/error-boundary.tsx b/apps/web/src/components/ui/error-boundary.tsx
index 1ccbee668..9f8db19b7 100644
--- a/apps/web/src/components/ui/error-boundary.tsx
+++ b/apps/web/src/components/ui/error-boundary.tsx
@@ -1,15 +1,15 @@
import React from "react";
import { ErrorDisplay } from "./error-display";
-interface ErrorBoundaryState {
+type ErrorBoundaryState = {
hasError: boolean;
error?: Error;
-}
+};
-interface ErrorBoundaryProps {
+type ErrorBoundaryProps = {
children: React.ReactNode;
fallback?: React.ComponentType<{ error: Error; resetError: () => void }>;
-}
+};
export class ErrorBoundary extends React.Component<
ErrorBoundaryProps,
diff --git a/apps/web/src/components/ui/error-display.tsx b/apps/web/src/components/ui/error-display.tsx
index 9f210d5fc..007670845 100644
--- a/apps/web/src/components/ui/error-display.tsx
+++ b/apps/web/src/components/ui/error-display.tsx
@@ -13,12 +13,12 @@ import {
CardTitle,
} from "./card";
-interface ErrorDisplayProps {
+type ErrorDisplayProps = {
error: unknown;
onRetry?: () => void;
title?: string;
className?: string;
-}
+};
export function ErrorDisplay({
error,
diff --git a/apps/web/src/components/ui/error-fallback.tsx b/apps/web/src/components/ui/error-fallback.tsx
index bcf2d7c47..5b9a7627e 100644
--- a/apps/web/src/components/ui/error-fallback.tsx
+++ b/apps/web/src/components/ui/error-fallback.tsx
@@ -1,9 +1,9 @@
import { ErrorDisplay } from "./error-display";
-interface ErrorFallbackProps {
+type ErrorFallbackProps = {
error: Error;
resetError: () => void;
-}
+};
export function ErrorFallback({ error, resetError }: ErrorFallbackProps) {
return (
diff --git a/apps/web/src/components/ui/kbd.tsx b/apps/web/src/components/ui/kbd.tsx
index 95bc4a7ba..ceb031a02 100644
--- a/apps/web/src/components/ui/kbd.tsx
+++ b/apps/web/src/components/ui/kbd.tsx
@@ -1,11 +1,11 @@
import { cn } from "@/lib/cn";
-interface KbdProps {
+type KbdProps = {
children: React.ReactNode;
className?: string;
description?: string;
hideDescription?: boolean;
-}
+};
export function Kbd({
children,
@@ -30,12 +30,12 @@ export function Kbd({
);
}
-interface KbdSequenceProps {
+type KbdSequenceProps = {
keys: string[];
separator?: string;
className?: string;
description?: string;
-}
+};
export function KbdSequence({
keys,
diff --git a/apps/web/src/components/ui/loading-skeleton.tsx b/apps/web/src/components/ui/loading-skeleton.tsx
index 46ee578e9..41945918a 100644
--- a/apps/web/src/components/ui/loading-skeleton.tsx
+++ b/apps/web/src/components/ui/loading-skeleton.tsx
@@ -1,8 +1,8 @@
import { cn } from "@/lib/cn";
-interface LoadingSkeletonProps {
+type LoadingSkeletonProps = {
className?: string;
-}
+};
export function LoadingSkeleton({ className }: LoadingSkeletonProps) {
return (
diff --git a/apps/web/src/components/ui/spinner.tsx b/apps/web/src/components/ui/spinner.tsx
index cda6fab79..6b2d1b711 100644
--- a/apps/web/src/components/ui/spinner.tsx
+++ b/apps/web/src/components/ui/spinner.tsx
@@ -27,12 +27,11 @@ const loaderVariants = cva("animate-spin text-primary", {
},
});
-interface SpinnerContentProps
- extends VariantProps<typeof spinnerVariants>,
- VariantProps<typeof loaderVariants> {
- className?: string;
- children?: React.ReactNode;
-}
+type SpinnerContentProps = VariantProps<typeof spinnerVariants> &
+ VariantProps<typeof loaderVariants> & {
+ className?: string;
+ children?: React.ReactNode;
+ };
export function Spinner({
size,
diff --git a/apps/web/src/hooks/use-keyboard-shortcuts.ts b/apps/web/src/hooks/use-keyboard-shortcuts.ts
index 42c0a2bb0..ce2f5b913 100644
--- a/apps/web/src/hooks/use-keyboard-shortcuts.ts
+++ b/apps/web/src/hooks/use-keyboard-shortcuts.ts
@@ -16,7 +16,7 @@ type ShortcutKey = string;
type PrefixKey = string;
type SequentialKey = string;
-interface KeyboardShortcutsContextType {
+type KeyboardShortcutsContextType = {
registerShortcut: (key: ShortcutKey, handler: ShortcutHandler) => void;
registerSequentialShortcut: (
prefix: PrefixKey,
@@ -32,7 +32,7 @@ interface KeyboardShortcutsContextType {
unregisterSequentialShortcut: (prefix: PrefixKey, key: SequentialKey) => void;
unregisterModifierShortcut: (modifierKey: string, key: string) => void;
activePrefix: string | null;
-}
+};
const KeyboardShortcutsContext =
createContext<KeyboardShortcutsContextType | null>(null);
diff --git a/apps/web/src/hooks/use-task-filters.ts b/apps/web/src/hooks/use-task-filters.ts
index 9ea8fe180..3d78680a6 100644
--- a/apps/web/src/hooks/use-task-filters.ts
+++ b/apps/web/src/hooks/use-task-filters.ts
@@ -3,13 +3,13 @@ import { useState } from "react";
import type { ProjectWithTasks } from "@/types/project";
import type Task from "@/types/task";
-export interface BoardFilters {
+export type BoardFilters = {
status: string | null;
priority: string | null;
assignee: string | null;
dueDate: string | null;
labels: string[] | null;
-}
+};
export function useTaskFilters(project: ProjectWithTasks | null | undefined) {
const [filters, setFilters] = useState<BoardFilters>({
diff --git a/apps/web/src/lib/error-handler.ts b/apps/web/src/lib/error-handler.ts
index aecbe0c17..b31d5d762 100644
--- a/apps/web/src/lib/error-handler.ts
+++ b/apps/web/src/lib/error-handler.ts
@@ -1,9 +1,9 @@
-export interface ApiError {
+export type ApiError = {
message: string;
type: "network" | "cors" | "auth" | "server" | "unknown";
status?: number;
originalError?: Error;
-}
+};
export function parseApiError(error: unknown): ApiError {
if (error instanceof Error) {
diff --git a/apps/web/src/main.tsx b/apps/web/src/main.tsx
index 96c8d4545..8925168c2 100644
--- a/apps/web/src/main.tsx
+++ b/apps/web/src/main.tsx
@@ -42,9 +42,9 @@ const router = createRouter({
});
declare module "@tanstack/react-router" {
- interface Register {
+ type Register = {
router: typeof router;
- }
+ };
}
function App() {
diff --git a/apps/web/src/vite-env.d.ts b/apps/web/src/vite-env.d.ts
index b041c5c45..65f6f29cb 100644
--- a/apps/web/src/vite-env.d.ts
+++ b/apps/web/src/vite-env.d.ts
@@ -3,10 +3,10 @@
declare const __APP_VERSION__: string;
-interface ImportMetaEnv {
+type ImportMetaEnv = {
readonly KANEO_API_URL: string;
-}
+};
-interface ImportMeta {
+type ImportMeta = {
readonly env: ImportMetaEnv;
-}
+};
diff --git a/packages/email/src/templates/magic-link.tsx b/packages/email/src/templates/magic-link.tsx
index cf5534400..44e4e7ea4 100644
--- a/packages/email/src/templates/magic-link.tsx
+++ b/packages/email/src/templates/magic-link.tsx
@@ -14,9 +14,9 @@ import React from "react";
void React;
-export interface MagicLinkEmailProps {
+export type MagicLinkEmailProps = {
magicLink: string;
-}
+};
const MagicLinkEmail = ({ magicLink }: MagicLinkEmailProps) => (
<Html>
diff --git a/packages/email/src/templates/workspace-invitation.tsx b/packages/email/src/templates/workspace-invitation.tsx
index 580cb9193..48fc4618b 100644
--- a/packages/email/src/templates/workspace-invitation.tsx
+++ b/packages/email/src/templates/workspace-invitation.tsx
@@ -14,13 +14,13 @@ import React from "react";
void React;
-export interface WorkspaceInvitationEmailProps {
+export type WorkspaceInvitationEmailProps = {
workspaceName: string;
inviterName: string;
inviterEmail: string;
invitationLink: string;
to: string;
-}
+};
const WorkspaceInvitationEmail = ({
workspaceName,