Skip to content

Unify Type Imports Across Server Files #25

Description

@babblebey

Currently, type imports in server files are inconsistent: some import types from "server/db", while others use imports directly from generated Prisma files (e.g., "...generated/prisma..."). This inconsistency could cause maintainability issues and confusion for contributors.

Task:

  • Identify all type imports in server-side code (especially those related to database types).
  • Standardize all server files to import types from a single source (preferably from "server/db").
  • Update all relevant files to use the unified import path.

Acceptance Criteria:

  • All server files reference types from either "server/db" or consistently from the chosen path.
  • No direct imports from generated Prisma files unless absolutely necessary (with a strong justification).
  • Brief documentation or code comment explaining the standard, if needed.

Example of current mixed import:

import type { db as appDb } from "~/server/db";
// elsewhere:
import type { Prisma } from "@prisma/client";

Benefits:

  • Improves code consistency and maintainability
  • Reduces risk of mismatches and breaking changes from Prisma updates

Please track files updated in the PR description or commit message.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions