Skip to content

include has index signature [x: string]: unknown #863

Description

@motopods

Package and version

0.14.0

What happened?

TypeScript error when returning Prisma include result from server function due to index signature [x: string]: unknown

TypeScript throws an error because the Prisma-generated type includes an index signature [x: string]: unknown, which violates the Serializable contract (likely because unknown is not assignable to the allowed types).

What did you expect to happen?

Avoid the extraneous [x: string]: unknown index signature, as it interferes with TypeScript's serialization type checking.

Minimal reproduction

const user = await context.db.orm.public.User.include('post').first()

// user type  
 user: {
    id: Char<26>;
    post: {
        [x: string]: unknown; // this should not be here.
    } | null;
    postId: Char<26> | null;
} | null

Environment

  • Node: v26.0.0
  • Windows 11
  • Bun
  • postgres19

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingneeds-triageAwaiting maintainer triage

    Type

    No type
    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