Type Alias PrismaModelCreate<PrismaClient, Model>

PrismaModelCreate: NonNullable<Parameters<PrismaClient[Model]["create"]>[0]> extends {
    data?: infer Data;
}
    ? NonNullable<Data> & Partial<
        {
            "[prismaModelCreateExclude]": true;
            "[prismaModelCreateOmitId]": true;
        },
    >
    : `ERROR: failed to infer creation entry for model '${Model}'`

Extracts the creation data for a model from the given PrismaClient type.

Type Parameters

import type {PrismaClient} from '@prisma/client';
import type {PrismaModelCreate} from '@augment-vir/common';

function doThing(entry: PrismaModelCreate<PrismaClient, 'User'>) {}