Can anyone help me convert this code snippet to Ja...
# orm-help
n
Can anyone help me convert this code snippet to JavaScript.
Copy code
import { PrismaClient } from '@prisma/client';
import { DMMFClass } from '@prisma/client/runtime';

const prisma = new PrismaClient();
const dmmf = ((prisma as any)._dmmf as DMMFClass);
w
Just remove types related stuff
Copy code
import { PrismaClient } from '@prisma/client';

const prisma = new PrismaClient();
const dmmf = prisma._dmmf;
n
Apparently _dmmf isn't present on prisma. What I'm trying to do is pass in the object that contains all the model metadata for adminjs. @Wanjas Bely @Ryan maybe you can help , you can look at the code example in the Readme https://github.com/SoftwareBrothers/adminjs-prisma
r
_dmmf
is a private field, so you need to use
// @ts-ignore
to access the field.