hayes
08/10/2021, 4:13 AMhayes
08/10/2021, 4:17 AMimport { PrismaClient } from "@prisma/client";
function createField<Type extends string>(options: {
type: Type;
resolve: (db: PrismaClient) => unknown;
}) {}
createField({
type: "Boolean",
resolve: async (db) => {
await db.user.findUnique({ where: { id: "1" } });
},
});
hayes
08/10/2021, 4:19 AMRyan
08/10/2021, 10:31 AMjanpio
janpio
hayes
08/10/2021, 6:07 PMmillsp
08/10/2021, 7:45 PMmillsp
08/10/2021, 7:48 PMd.ts
directly and the type count is incorrect. We do generate a lot of types for prisma.hayes
08/11/2021, 5:17 PMhayes
08/11/2021, 5:18 PM