(target: object, runtimeDataModel: RuntimeDataModel)
| 1 | import { BaseDMMF, lazyProperty, RuntimeDataModel } from '@prisma/client-common' |
| 2 | |
| 3 | export function defineDmmfProperty(target: object, runtimeDataModel: RuntimeDataModel) { |
| 4 | const dmmfLazy = lazyProperty(() => runtimeDataModelToBaseDmmf(runtimeDataModel)) |
| 5 | |
| 6 | Object.defineProperty(target, 'dmmf', { |
| 7 | get: () => dmmfLazy.get(), |
| 8 | }) |
| 9 | } |
| 10 | |
| 11 | function runtimeDataModelToBaseDmmf(runtimeDataModel: RuntimeDataModel): BaseDMMF { |
| 12 | if (TARGET_BUILD_TYPE === 'wasm-compiler-edge') { |
nothing calls this directly
no test coverage detected