emitEnums() function

Emit the enum constants for a contract.

Signature:

export declare function emitEnums(input: Omit<EmitModelsOptions, 'imports'>): string;

Parameters

Parameter

Type

Description

input

Omit<EmitModelsOptions, 'imports'>

Returns:

string

The file content.

Remarks

Prisma 7 exposed each enum as an as const object on the generated client, and conventions.md's no-bare-strings rule leans on it: a member is written as CredentialType.PASSWORD, never as 'PASSWORD'. Prisma Next carries the members in the contract but publishes no such object, so it is emitted here — otherwise every call site that named a member would have to restate the literal, which is the drift that rule exists to prevent.

Read this page as plain markdown — no HTML, no navigation. For pasting into an LLM, or for an agent to fetch.