diff --git a/apps/cs/src/pages/groups/model/groups-table-columns.tsx b/apps/cs/src/pages/groups/model/groups-table-columns.tsx index 0f417a304..0cb6a1f84 100644 --- a/apps/cs/src/pages/groups/model/groups-table-columns.tsx +++ b/apps/cs/src/pages/groups/model/groups-table-columns.tsx @@ -4,6 +4,14 @@ import { type GroupListResponseDto } from "@/entities/group"; import { MenuAuthorityDialog } from "../ui/menu-authority-dialog"; import { GroupsDialog } from "../ui/groups-dialog"; + +declare module "@tanstack/react-table" { + // eslint-disable-next-line @typescript-eslint/no-unused-vars + interface TableMeta { + onDelete: (groupId: string) => void; + } +} + export const columns: ColumnDef[] = [ { accessorKey: "groupId", diff --git a/apps/cs/src/types/tanstack-table.d.ts b/apps/cs/src/types/tanstack-table.d.ts deleted file mode 100644 index 9cd9838a2..000000000 --- a/apps/cs/src/types/tanstack-table.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import '@tanstack/react-table'; - -// 오류가 표시되는 이유는 TypeScript가 meta 객체 안에 onDelete라는 속성이 존재한다는 것을 모르기 때문입니다 -declare module '@tanstack/react-table' { - // TData는 테이블의 row 데이터 타입을 의미합니다. - // interface TableMeta에 우리 프로젝트에서 사용할 커스텀 속성의 타입을 정의합니다. - interface TableMeta { - // handleDelete 함수가 string 타입의 인자를 받으므로, 타입을 명시해줍니다. - onDelete: (groupId: string) => void; - } -} \ No newline at end of file