(dmmf: DMMFHelper)
| 5 | import { getOmitName } from '../utils' |
| 6 | |
| 7 | export 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 | } |
no test coverage detected
searching dependent graphs…