MCPcopy
hub / github.com/prisma/prisma / globalOmitConfig

Function globalOmitConfig

packages/client-generator-js/src/TSClient/globalOmit.ts:7–16  ·  view source on GitHub ↗
(dmmf: DMMFHelper)

Source from the content-addressed store, hash-verified

5import { getOmitName } from '../utils'
6
7export function globalOmitConfig(dmmf: DMMFHelper) {
8 const objectType = ts.objectType().addMultiple(
9 dmmf.datamodel.models.map((model) => {
10 const type = ts.namedType(getOmitName(model.name))
11 return ts.property(uncapitalize(model.name), type).optional()
12 }),
13 )
14
15 return ts.moduleExport(ts.typeDeclaration('GlobalOmitConfig', objectType))
16}

Callers 1

toTSMethod · 0.90

Calls 4

getOmitNameFunction · 0.90
uncapitalizeFunction · 0.90
addMultipleMethod · 0.45
optionalMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…