From 418a553429c664b14e613ea7ba61896045aa4b6a Mon Sep 17 00:00:00 2001 From: Brendan Chen Date: Tue, 17 Mar 2026 10:44:23 -0700 Subject: [PATCH] refactor: remove unused exported type interfaces CreateFileParams, UserRow, CreateUserParams, and MultipartFile were exported but never imported outside their own modules. Narrowed visibility to module-local to keep the public surface minimal. Confirmed with knip (zero findings) and all 61 tests passing. --- src/db/files.ts | 2 +- src/db/users.ts | 4 ++-- tests/helpers/setup.ts | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/db/files.ts b/src/db/files.ts index 65f677f..9ade69c 100644 --- a/src/db/files.ts +++ b/src/db/files.ts @@ -10,7 +10,7 @@ export interface FileRow { created_at: string; } -export interface CreateFileParams { +interface CreateFileParams { id: string; userId: number; originalName: string; diff --git a/src/db/users.ts b/src/db/users.ts index 5d49057..47c3ead 100644 --- a/src/db/users.ts +++ b/src/db/users.ts @@ -1,13 +1,13 @@ import type Database from 'better-sqlite3'; -export interface UserRow { +interface UserRow { id: number; username: string; password_hash: string; created_at: string; } -export interface CreateUserParams { +interface CreateUserParams { username: string; passwordHash: string; } diff --git a/tests/helpers/setup.ts b/tests/helpers/setup.ts index 12a186f..1e18d6c 100644 --- a/tests/helpers/setup.ts +++ b/tests/helpers/setup.ts @@ -18,7 +18,7 @@ export async function loginAs(app: FastifyInstance, username: string, password: return cookie.split(';')[0].replace('token=', ''); } -export interface MultipartFile { +interface MultipartFile { filename: string; contentType: string; data: Buffer;